< prev index next >
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/HelloDynamic.java
Print this page
@@ -50,10 +50,13 @@
String baseArchiveName = getNewArchiveName("base");
dumpBaseArchive(baseArchiveName);
doTest(baseArchiveName, topArchiveName);
}
+ private static final String JDWP_OPTION =
+ "-Xrunjdwp:transport=dt_socket,server=y,suspend=n";
+
private static void doTest(String baseArchiveName, String topArchiveName) throws Exception {
String appJar = ClassFileInstaller.getJarPath("hello.jar");
String mainClass = "Hello";
dump2(baseArchiveName, topArchiveName,
"-Xlog:cds",
@@ -69,7 +72,21 @@
"-cp", appJar, mainClass)
.assertNormalExit(output -> {
output.shouldContain("Hello source: shared objects file")
.shouldHaveExitValue(0);
});
+
+ // Sanity test with JDWP options.
+ // Test with the default base archive should be sufficient.
+ if (baseArchiveName == null) {
+ run2(baseArchiveName, topArchiveName,
+ JDWP_OPTION,
+ "-Xlog:class+load",
+ "-Xlog:cds+dynamic=debug,cds=debug",
+ "-cp", appJar, mainClass)
+ .assertNormalExit(output -> {
+ output.shouldContain("Hello source: shared objects file")
+ .shouldHaveExitValue(0);
+ });
+ }
}
}
< prev index next >