< prev index next >

test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/OldClassVerifierTrouble.java

Print this page
@@ -63,11 +63,12 @@
          String appJar = ClassFileInstaller.getJarPath("oldsuper-fail-verifier.jar");
  
          // create a custom base archive containing an old class
          OutputAnalyzer output = TestCommon.dump(appJar,
              TestCommon.list("VerifierTroubleApp", "VerifierTroublev49", "ChildOldSuper"),
-             "-Xlog:class+load,cds+class=debug");
+             "-Xlog:class+load,cds+class=debug",
+             "-XX:-PreloadSharedClasses");
          TestCommon.checkDump(output);
          // Check the ChildOldSuper and VerifierTroublev49 are being dumped into the base archive.
          output.shouldMatch(".cds.class.*klass.*0x.*app.*ChildOldSuper.*unlinked")
                .shouldMatch(".cds.class.*klass.*0x.*app.*VerifierTroublev49.*unlinked");
  

@@ -77,10 +78,11 @@
          // The old class is in the base archive and will be
          // accessed from VerifierTroubleApp.
          // Linking VerifierTroublev49 would result in java.lang.VerifyError.
          dump2(baseArchiveName, topArchiveName,
                "-Xlog:cds,cds+dynamic,class+load,cds+class=debug",
+               "-XX:-PreloadSharedClasses",
                "-cp", appJar,
                appClass)
              .assertAbnormalExit(out -> {
                      out.shouldContain("VerifierTroublev49 source: shared objects file")
                         .shouldContain("ChildOldSuper source: shared objects file")
< prev index next >