8343532: Test test/hotspot/jtreg/runtime/cds/appcds/jigsaw/addmods/AddmodsOption.java fails on Linux ppc64le after JDK-8319343
Reviewed-by: mdoerr, lucy
This commit is contained in:
parent
fbf9b96b61
commit
8cb1221194
@ -28,12 +28,19 @@
|
|||||||
* @requires vm.cds.write.archived.java.heap
|
* @requires vm.cds.write.archived.java.heap
|
||||||
* @requires vm.flagless
|
* @requires vm.flagless
|
||||||
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
|
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
|
||||||
* @run driver AddmodsOption
|
* @build jdk.test.whitebox.WhiteBox
|
||||||
|
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
|
||||||
|
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AddmodsOption
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import jdk.test.lib.process.OutputAnalyzer;
|
import jdk.test.lib.process.OutputAnalyzer;
|
||||||
|
import jdk.test.whitebox.WhiteBox;
|
||||||
|
|
||||||
public class AddmodsOption {
|
public class AddmodsOption {
|
||||||
|
|
||||||
|
private static final WhiteBox WB = WhiteBox.getWhiteBox();
|
||||||
|
private static final boolean isJVMCISupported = (WB.getBooleanVMFlag("EnableJVMCI") != null);
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
final String moduleOption = "jdk.httpserver/sun.net.httpserver.simpleserver.Main";
|
final String moduleOption = "jdk.httpserver/sun.net.httpserver.simpleserver.Main";
|
||||||
final String incubatorModule = "jdk.incubator.vector";
|
final String incubatorModule = "jdk.incubator.vector";
|
||||||
@ -42,7 +49,7 @@ public class AddmodsOption {
|
|||||||
final String allSystem = "ALL-SYSTEM";
|
final String allSystem = "ALL-SYSTEM";
|
||||||
final String allModulePath = "ALL-MODULE-PATH";
|
final String allModulePath = "ALL-MODULE-PATH";
|
||||||
final String loggingOption = "-Xlog:cds=debug,cds+module=debug,cds+heap=info,module=trace";
|
final String loggingOption = "-Xlog:cds=debug,cds+module=debug,cds+heap=info,module=trace";
|
||||||
final String versionPattern = "java.[0-9][0-9][-].*";
|
final String versionPattern = "java.[0-9][0-9].*";
|
||||||
final String subgraphCannotBeUsed = "subgraph jdk.internal.module.ArchivedBootLayer cannot be used because full module graph is disabled";
|
final String subgraphCannotBeUsed = "subgraph jdk.internal.module.ArchivedBootLayer cannot be used because full module graph is disabled";
|
||||||
final String warningIncubator = "WARNING: Using incubator modules: jdk.incubator.vector";
|
final String warningIncubator = "WARNING: Using incubator modules: jdk.incubator.vector";
|
||||||
String archiveName = TestCommon.getNewArchiveName("addmods-option");
|
String archiveName = TestCommon.getNewArchiveName("addmods-option");
|
||||||
@ -136,31 +143,33 @@ public class AddmodsOption {
|
|||||||
.shouldContain("subgraph jdk.internal.module.ArchivedBootLayer is not recorde")
|
.shouldContain("subgraph jdk.internal.module.ArchivedBootLayer is not recorde")
|
||||||
.shouldHaveExitValue(0);
|
.shouldHaveExitValue(0);
|
||||||
|
|
||||||
// dump an archive with JVMCI option which indirectly adds the
|
if (isJVMCISupported) {
|
||||||
// jdk.internal.vm.ci module using the --add-modules option
|
// dump an archive with JVMCI option which indirectly adds the
|
||||||
archiveName = TestCommon.getNewArchiveName("jvmci-module");
|
// jdk.internal.vm.ci module using the --add-modules option
|
||||||
TestCommon.setCurrentArchiveName(archiveName);
|
archiveName = TestCommon.getNewArchiveName("jvmci-module");
|
||||||
oa = TestCommon.dumpBaseArchive(
|
TestCommon.setCurrentArchiveName(archiveName);
|
||||||
archiveName,
|
oa = TestCommon.dumpBaseArchive(
|
||||||
loggingOption,
|
archiveName,
|
||||||
"-XX:+UnlockExperimentalVMOptions",
|
loggingOption,
|
||||||
"-XX:+EagerJVMCI", "-XX:+UseJVMCICompiler",
|
"-XX:+UnlockExperimentalVMOptions",
|
||||||
"-version");
|
"-XX:+EagerJVMCI", "-XX:+UseJVMCICompiler",
|
||||||
oa.shouldHaveExitValue(0);
|
"-version");
|
||||||
|
oa.shouldHaveExitValue(0);
|
||||||
|
|
||||||
// run with the JVMCI option
|
// run with the JVMCI option
|
||||||
oa = TestCommon.execCommon(
|
oa = TestCommon.execCommon(
|
||||||
loggingOption,
|
loggingOption,
|
||||||
"-XX:+UnlockExperimentalVMOptions",
|
"-XX:+UnlockExperimentalVMOptions",
|
||||||
"-XX:+EagerJVMCI", "-XX:+UseJVMCICompiler",
|
"-XX:+EagerJVMCI", "-XX:+UseJVMCICompiler",
|
||||||
"-version");
|
"-version");
|
||||||
try {
|
try {
|
||||||
oa.shouldHaveExitValue(0)
|
oa.shouldHaveExitValue(0)
|
||||||
.shouldMatch("cds,module.*Restored from archive: entry.0x.*name jdk.internal.vm.ci");
|
.shouldMatch("cds,module.*Restored from archive: entry.0x.*name jdk.internal.vm.ci");
|
||||||
} catch (RuntimeException re) {
|
} catch (RuntimeException re) {
|
||||||
// JVMCI compile may not be available
|
// JVMCI compile may not be available
|
||||||
oa.shouldHaveExitValue(1)
|
oa.shouldHaveExitValue(1)
|
||||||
.shouldContain("Cannot use JVMCI compiler: No JVMCI compiler found");
|
.shouldContain("Cannot use JVMCI compiler: No JVMCI compiler found");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// dump an archive with multiple modules in -add-modules
|
// dump an archive with multiple modules in -add-modules
|
||||||
|
Loading…
Reference in New Issue
Block a user