test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/Simple.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Sdiff test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule

test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/Simple.java

Print this page




  60         JarBuilder.build("javanaming", "javax/naming/spi/NamingManager");
  61         moduleJar = TestCommon.getTestJar("javanaming.jar");
  62 
  63         System.out.println("Test dumping with --patch-module");
  64         OutputAnalyzer output =
  65             TestCommon.dump(null,
  66                 TestCommon.list("javax/naming/spi/NamingManager"),
  67                 "--patch-module=java.naming=" + moduleJar,
  68                 "-Xlog:class+load",
  69                 "-Xlog:class+path=info",
  70                 "PatchMain", "javax.naming.spi.NamingManager");
  71         output.shouldHaveExitValue(1)
  72               .shouldContain("Cannot use the following option when dumping the shared archive: --patch-module");
  73 
  74         TestCommon.run(
  75             "-XX:+UnlockDiagnosticVMOptions",
  76             "--patch-module=java.naming=" + moduleJar,
  77             "-Xlog:class+load",
  78             "-Xlog:class+path=info",
  79             "PatchMain", "javax.naming.spi.NamingManager")
  80             .assertSilentlyDisabledCDS(out -> {
  81                 out.shouldHaveExitValue(0)
  82                    .shouldContain("I pass!");
  83             });
  84     }
  85 }


  60         JarBuilder.build("javanaming", "javax/naming/spi/NamingManager");
  61         moduleJar = TestCommon.getTestJar("javanaming.jar");
  62 
  63         System.out.println("Test dumping with --patch-module");
  64         OutputAnalyzer output =
  65             TestCommon.dump(null,
  66                 TestCommon.list("javax/naming/spi/NamingManager"),
  67                 "--patch-module=java.naming=" + moduleJar,
  68                 "-Xlog:class+load",
  69                 "-Xlog:class+path=info",
  70                 "PatchMain", "javax.naming.spi.NamingManager");
  71         output.shouldHaveExitValue(1)
  72               .shouldContain("Cannot use the following option when dumping the shared archive: --patch-module");
  73 
  74         TestCommon.run(
  75             "-XX:+UnlockDiagnosticVMOptions",
  76             "--patch-module=java.naming=" + moduleJar,
  77             "-Xlog:class+load",
  78             "-Xlog:class+path=info",
  79             "PatchMain", "javax.naming.spi.NamingManager")
  80             .assertSilentlyDisabledCDS(0, "I pass!");



  81     }
  82 }
test/hotspot/jtreg/runtime/appcds/jigsaw/PatchModule/Simple.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File