< prev index next >
test/hotspot/jtreg/runtime/logging/ModulesTest.java
Print this page
*** 32,48 ****
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
public class ModulesTest {
public static void main(String[] args) throws Exception {
! testModuleTrace("-Xlog:module=trace", "-version");
! testModuleLoad("-Xlog:module+load", "-version");
! testModuleUnload("-Xlog:module+unload", "-version");
// same as -Xlog:module+load -Xlog:module+unload
! testModuleLoad("-verbose:module", "-version");
}
static void testModuleTrace(String... args) throws Exception {
OutputAnalyzer output = run(args);
output.shouldContain("define_javabase_module(): Definition of module:");
--- 32,53 ----
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
public class ModulesTest {
+ // If modules in the system image have been archived in CDS, no Modules will
+ // be dynamically created at runtime. Disable CDS so all of the expected messages
+ // are printed.
+ private static String XSHARE_OFF = "-Xshare:off";
+
public static void main(String[] args) throws Exception {
! testModuleTrace("-Xlog:module=trace", XSHARE_OFF, "-version");
! testModuleLoad("-Xlog:module+load", XSHARE_OFF, "-version");
! testModuleUnload("-Xlog:module+unload", XSHARE_OFF, "-version");
// same as -Xlog:module+load -Xlog:module+unload
! testModuleLoad("-verbose:module", XSHARE_OFF, "-version");
}
static void testModuleTrace(String... args) throws Exception {
OutputAnalyzer output = run(args);
output.shouldContain("define_javabase_module(): Definition of module:");
< prev index next >