test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/DynamicArchiveRelocationTest.java
changeset 59098 124164752fe4
parent 59070 22ee476cc664
equal deleted inserted replaced
59097:148921c01038 59098:124164752fe4
    86         String logArg = "-Xlog:cds=debug,cds+reloc=debug";
    86         String logArg = "-Xlog:cds=debug,cds+reloc=debug";
    87 
    87 
    88         String baseArchiveName = getNewArchiveName("base");
    88         String baseArchiveName = getNewArchiveName("base");
    89         String topArchiveName  = getNewArchiveName("top");
    89         String topArchiveName  = getNewArchiveName("top");
    90 
    90 
    91         String runtimeMsg1 = "ArchiveRelocationMode == 1: always map archive(s) at an alternative address";
    91         String runtimeMsg1 = "runtime archive relocation start";
    92         String runtimeMsg2 = "runtime archive relocation start";
    92         String runtimeMsg2 = "runtime archive relocation done";
    93         String runtimeMsg3 = "runtime archive relocation done";
       
    94         String unlockArg = "-XX:+UnlockDiagnosticVMOptions";
    93         String unlockArg = "-XX:+UnlockDiagnosticVMOptions";
    95 
    94 
    96         // (1) Dump base archive (static)
    95         // (1) Dump base archive (static)
    97 
    96 
    98         OutputAnalyzer out = dumpBaseArchive(baseArchiveName, unlockArg, dumpBaseRelocArg, logArg);
    97         OutputAnalyzer out = dumpBaseArchive(baseArchiveName, unlockArg, dumpBaseRelocArg, logArg);
   110               "-cp", appJar, mainClass)
   109               "-cp", appJar, mainClass)
   111             .assertNormalExit(output -> {
   110             .assertNormalExit(output -> {
   112                     if (dump_top_reloc) {
   111                     if (dump_top_reloc) {
   113                         output.shouldContain(runtimeMsg1);
   112                         output.shouldContain(runtimeMsg1);
   114                         output.shouldContain(runtimeMsg2);
   113                         output.shouldContain(runtimeMsg2);
   115                         output.shouldContain(runtimeMsg3);
       
   116                     }
   114                     }
   117                 });
   115                 });
   118 
   116 
   119         run2(baseArchiveName, topArchiveName,
   117         run2(baseArchiveName, topArchiveName,
   120              unlockArg,
   118              unlockArg,
   123             "-cp", appJar, mainClass)
   121             "-cp", appJar, mainClass)
   124             .assertNormalExit(output -> {
   122             .assertNormalExit(output -> {
   125                     if (run_reloc) {
   123                     if (run_reloc) {
   126                         output.shouldContain(runtimeMsg1);
   124                         output.shouldContain(runtimeMsg1);
   127                         output.shouldContain(runtimeMsg2);
   125                         output.shouldContain(runtimeMsg2);
   128                         output.shouldContain(runtimeMsg3);
       
   129                     }
   126                     }
   130                 });
   127                 });
   131     }
   128     }
   132 }
   129 }