19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 // NOTE: the test takes a long time for each VM option combination, so we split 26 // it into 3 @test parts, so that they can be executed in parallel. If you make a 27 // change, please ensure all @test blocks are in sync. 28 29 30 /* 31 * @test 32 * @summary Test options that are incompatible with use of shared strings 33 * Also test mismatch in oops encoding between dump time and run time 34 * @requires vm.cds.archived.java.heap 35 * @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set 36 * via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed 37 * vm options. 38 * @requires (vm.gc=="null") 39 * @library /test/lib /test/hotspot/jtreg/runtime/appcds 40 * @modules jdk.jartool/sun.tools.jar 41 * @build sun.hotspot.WhiteBox 42 * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission 43 * @build HelloString 44 * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 0 45 */ 46 47 48 /* 49 * @test 50 * @requires vm.cds.archived.java.heap 51 * @requires (vm.gc=="null") 52 * @library /test/lib /test/hotspot/jtreg/runtime/appcds 53 * @modules jdk.jartool/sun.tools.jar 54 * @build sun.hotspot.WhiteBox 55 * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission 56 * @build HelloString 57 * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 1 58 */ 59 60 /* 61 * @test 62 * @requires vm.cds.archived.java.heap 63 * @requires (vm.gc=="null") 64 * @library /test/lib /test/hotspot/jtreg/runtime/appcds 65 * @modules jdk.jartool/sun.tools.jar 66 * @build sun.hotspot.WhiteBox 67 * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission 68 * @build HelloString 69 * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 2 70 */ 71 72 73 import jdk.test.lib.Asserts; 74 import jdk.test.lib.Platform; 75 import jdk.test.lib.process.OutputAnalyzer; 76 77 import sun.hotspot.code.Compiler; 78 import sun.hotspot.gc.GC; 79 80 public class IncompatibleOptions { 81 static final String COOPS_DUMP_WARNING = 82 "Cannot dump shared archive when UseCompressedOops or UseCompressedClassPointers is off"; 83 static final String COOPS_EXEC_WARNING = 84 "UseCompressedOops and UseCompressedClassPointers must be on for UseSharedSpaces"; | 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 // NOTE: the test takes a long time for each VM option combination, so we split 26 // it into 3 @test parts, so that they can be executed in parallel. If you make a 27 // change, please ensure all @test blocks are in sync. 28 29 30 /* 31 * @test 32 * @summary Test options that are incompatible with use of shared strings 33 * Also test mismatch in oops encoding between dump time and run time 34 * @requires vm.cds.archived.java.heap 35 * @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set 36 * via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed 37 * vm options. 38 * @requires (vm.gc=="null") 39 * @library /test/lib /test/hotspot/jtreg/runtime/cds 40 * @modules jdk.jartool/sun.tools.jar 41 * @build sun.hotspot.WhiteBox 42 * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission 43 * @build HelloString 44 * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 0 45 */ 46 47 48 /* 49 * @test 50 * @requires vm.cds.archived.java.heap 51 * @requires (vm.gc=="null") 52 * @library /test/lib /test/hotspot/jtreg/runtime/cds 53 * @modules jdk.jartool/sun.tools.jar 54 * @build sun.hotspot.WhiteBox 55 * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission 56 * @build HelloString 57 * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 1 58 */ 59 60 /* 61 * @test 62 * @requires vm.cds.archived.java.heap 63 * @requires (vm.gc=="null") 64 * @library /test/lib /test/hotspot/jtreg/runtime/cds 65 * @modules jdk.jartool/sun.tools.jar 66 * @build sun.hotspot.WhiteBox 67 * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission 68 * @build HelloString 69 * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 2 70 */ 71 72 73 import jdk.test.lib.Asserts; 74 import jdk.test.lib.Platform; 75 import jdk.test.lib.process.OutputAnalyzer; 76 77 import sun.hotspot.code.Compiler; 78 import sun.hotspot.gc.GC; 79 80 public class IncompatibleOptions { 81 static final String COOPS_DUMP_WARNING = 82 "Cannot dump shared archive when UseCompressedOops or UseCompressedClassPointers is off"; 83 static final String COOPS_EXEC_WARNING = 84 "UseCompressedOops and UseCompressedClassPointers must be on for UseSharedSpaces"; |