< prev index next >

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

Print this page

65     }
66 
67     // Test with custom base archive + top archive
68     static void testCustomBase() throws Exception {
69         String topArchiveName = getNewArchiveName("top2");
70         doTest(helloBaseArchive, topArchiveName);
71     }
72 
73     private static void doTest(String baseArchiveName, String topArchiveName) throws Exception {
74         dump2(baseArchiveName, topArchiveName,
75              "-Xlog:class+load,cds,cds+dynamic=debug",
76              "-cp", appJar, mainClass)
77             .assertNormalExit(output -> {
78                     output.shouldContain("Written dynamic archive 0x");
79                 });
80 
81         run2(baseArchiveName, topArchiveName,
82             "-Xlog:class+load,cds+dynamic=debug,cds=debug",
83             "-cp", appJar, mainClass)
84             .assertNormalExit(output -> {
85                 output.shouldContain("LambHello source: shared objects file")
86                       .shouldMatch("class.load.*LambHello[$][$]Lambda.*0x.*source:.shared.objects.file")
87                       .shouldNotMatch("class.load.*LambHello[$][$]Lambda.*0x.*source:.shared.objects.file.*(top)");

88                 });
89 
90     }
91 }

65     }
66 
67     // Test with custom base archive + top archive
68     static void testCustomBase() throws Exception {
69         String topArchiveName = getNewArchiveName("top2");
70         doTest(helloBaseArchive, topArchiveName);
71     }
72 
73     private static void doTest(String baseArchiveName, String topArchiveName) throws Exception {
74         dump2(baseArchiveName, topArchiveName,
75              "-Xlog:class+load,cds,cds+dynamic=debug",
76              "-cp", appJar, mainClass)
77             .assertNormalExit(output -> {
78                     output.shouldContain("Written dynamic archive 0x");
79                 });
80 
81         run2(baseArchiveName, topArchiveName,
82             "-Xlog:class+load,cds+dynamic=debug,cds=debug",
83             "-cp", appJar, mainClass)
84             .assertNormalExit(output -> {
85                 // FIXME:leyden-premain : we disabled archived Lambda proxy classes due to JDK-8307468
86                 // output.shouldContain("LambHello source: shared objects file")
87                    // .shouldMatch("class.load.*LambHello[$][$]Lambda.*0x.*source:.shared.objects.file")
88                    // .shouldNotMatch("class.load.*LambHello[$][$]Lambda.*0x.*source:.shared.objects.file.*(top)");
89                 });
90 
91     }
92 }
< prev index next >