34 * jdk.internal.jvmstat/sun.jvmstat.monitor 35 * @compile test-classes/HelloExt.java 36 * @build sun.hotspot.WhiteBox 37 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 38 * @run main HelloExtTest 39 */ 40 41 import jdk.test.lib.process.OutputAnalyzer; 42 43 public class HelloExtTest { 44 45 public static void main(String[] args) throws Exception { 46 JarBuilder.build("helloExt", "HelloExt"); 47 48 String appJar = TestCommon.getTestJar("helloExt.jar"); 49 JarBuilder.build(true, "WhiteBox", "sun/hotspot/WhiteBox"); 50 String whiteBoxJar = TestCommon.getTestJar("WhiteBox.jar"); 51 String bootClassPath = "-Xbootclasspath/a:" + whiteBoxJar; 52 53 TestCommon.dump(appJar, 54 TestCommon.list("org/omg/CORBA/ORB", "[Ljava/lang/Comparable;"), 55 bootClassPath, "-verbose:class", "--add-modules", "java.corba"); 56 57 String prefix = ".class.load. "; 58 String class_pattern = ".*LambdaForm[$]MH[/][0123456789].*"; 59 String suffix = ".*source: shared objects file.*"; 60 String pattern = prefix + class_pattern + suffix; 61 62 TestCommon.run("-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", 63 "-cp", appJar, bootClassPath, "-verbose:class", "--add-modules", "java.corba", "HelloExt") 64 .assertNormalExit(output -> output.shouldNotMatch(pattern)); 65 66 67 TestCommon.run("-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", 68 "-cp", appJar, bootClassPath, "-verbose:class", 69 "-XX:+PrintSharedArchiveAndExit", "-XX:+PrintSharedDictionary", 70 "--add-modules", "java.corba", "HelloExt") 71 .assertNormalExit(output -> output.shouldNotMatch(class_pattern)); 72 } 73 } | 34 * jdk.internal.jvmstat/sun.jvmstat.monitor 35 * @compile test-classes/HelloExt.java 36 * @build sun.hotspot.WhiteBox 37 * @run driver ClassFileInstaller sun.hotspot.WhiteBox 38 * @run main HelloExtTest 39 */ 40 41 import jdk.test.lib.process.OutputAnalyzer; 42 43 public class HelloExtTest { 44 45 public static void main(String[] args) throws Exception { 46 JarBuilder.build("helloExt", "HelloExt"); 47 48 String appJar = TestCommon.getTestJar("helloExt.jar"); 49 JarBuilder.build(true, "WhiteBox", "sun/hotspot/WhiteBox"); 50 String whiteBoxJar = TestCommon.getTestJar("WhiteBox.jar"); 51 String bootClassPath = "-Xbootclasspath/a:" + whiteBoxJar; 52 53 TestCommon.dump(appJar, 54 TestCommon.list("javax/annotation/processing/FilerException", "[Ljava/lang/Comparable;"), 55 bootClassPath, "-verbose:class"); 56 57 String prefix = ".class.load. "; 58 String class_pattern = ".*LambdaForm[$]MH[/][0123456789].*"; 59 String suffix = ".*source: shared objects file.*"; 60 String pattern = prefix + class_pattern + suffix; 61 62 TestCommon.run("-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", 63 "-cp", appJar, bootClassPath, "-verbose:class", "HelloExt") 64 .assertNormalExit(output -> output.shouldNotMatch(pattern)); 65 66 67 TestCommon.run("-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", 68 "-cp", appJar, bootClassPath, "-verbose:class", 69 "-XX:+PrintSharedArchiveAndExit", "-XX:+PrintSharedDictionary", 70 "HelloExt") 71 .assertNormalExit(output -> output.shouldNotMatch(class_pattern)); 72 } 73 } |