< prev index next >

test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java

Print this page

*** 25,41 **** /* * @test * @summary Check most common errors in file format * @requires vm.cds.archived.java.heap * @library /test/lib /test/hotspot/jtreg/runtime/appcds ! * @modules java.base/jdk.internal.misc ! * @modules java.management ! * jdk.jartool/sun.tools.jar * @build HelloString * @run driver InvalidFileFormat ! * @run main/othervm -XX:+UseStringDeduplication InvalidFileFormat ! * @run main/othervm -XX:-CompactStrings InvalidFileFormat */ import java.io.File; import jdk.test.lib.cds.CDSTestUtils; import jdk.test.lib.process.OutputAnalyzer; --- 25,39 ---- /* * @test * @summary Check most common errors in file format * @requires vm.cds.archived.java.heap * @library /test/lib /test/hotspot/jtreg/runtime/appcds ! * @modules jdk.jartool/sun.tools.jar * @build HelloString * @run driver InvalidFileFormat ! * @run driver InvalidFileFormat -XX:+UseStringDeduplication ! * @run driver InvalidFileFormat -XX:-CompactStrings */ import java.io.File; import jdk.test.lib.cds.CDSTestUtils; import jdk.test.lib.process.OutputAnalyzer;
*** 44,53 **** --- 42,52 ---- // This file is not an exhastive test of various shared data file corruption // Note on usability intent: the shared data file is created and handled by // the previledge person in the server environment. public class InvalidFileFormat { public static void main(String[] args) throws Exception { + SharedStringsUtils.setVMOptionsPrefix(args); SharedStringsUtils.buildJar("HelloString"); test("NonExistentFile.txt", "Unable to get hashtable dump file size"); test("InvalidHeader.txt", "wrong version of hashtable dump file"); test("InvalidVersion.txt", "wrong version of hashtable dump file");
< prev index next >