|
@@ -33,6 +33,7 @@ |
|
|
* @run driver Simple |
|
|
*/ |
|
|
|
|
|
import jdk.test.lib.cds.CDSTestUtils; |
|
|
import jdk.test.lib.compiler.InMemoryJavaCompiler; |
|
|
import jdk.test.lib.process.OutputAnalyzer; |
|
|
|
|
@@ -78,18 +79,20 @@ public static void main(String args[]) throws Throwable { |
|
|
.assertSilentlyDisabledCDS(0, "I pass!"); |
|
|
|
|
|
// ======================================== |
|
|
System.out.println("Dump again without --patch-module"); |
|
|
output = |
|
|
TestCommon.dump(null, |
|
|
TestCommon.list("javax/naming/spi/NamingManager")); |
|
|
output.shouldHaveExitValue(0); |
|
|
if (!CDSTestUtils.DYNAMIC_DUMP) { |
|
|
System.out.println("Dump again without --patch-module"); |
|
|
output = |
|
|
TestCommon.dump(null, |
|
|
TestCommon.list("javax/naming/spi/NamingManager")); |
|
|
output.shouldHaveExitValue(0); |
|
|
|
|
|
TestCommon.run( |
|
|
"-XX:+UnlockDiagnosticVMOptions", |
|
|
"--patch-module=java.naming=" + moduleJar, |
|
|
"-Xlog:class+load", |
|
|
"-Xlog:class+path=info", |
|
|
"PatchMain", "javax.naming.spi.NamingManager") |
|
|
.assertSilentlyDisabledCDS(0, "I pass!"); |
|
|
TestCommon.run( |
|
|
"-XX:+UnlockDiagnosticVMOptions", |
|
|
"--patch-module=java.naming=" + moduleJar, |
|
|
"-Xlog:class+load", |
|
|
"-Xlog:class+path=info", |
|
|
"PatchMain", "javax.naming.spi.NamingManager") |
|
|
.assertSilentlyDisabledCDS(0, "I pass!"); |
|
|
} |
|
|
} |
|
|
} |