8210515: [TESTBUG]CheckArchivedModuleApp.java needs to check if EnableJVMCI is set.
Summary: System module objects are not archived when EnableJVMCI is set to true.
Reviewed-by: iklam, ccheung
--- a/test/hotspot/jtreg/ProblemList-graal.txt Mon Sep 10 14:23:37 2018 -0700
+++ b/test/hotspot/jtreg/ProblemList-graal.txt Mon Sep 10 18:30:24 2018 -0400
@@ -147,9 +147,6 @@
vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t003/TestDescription.java 8051349 generic-all
-runtime/appcds/cacheObject/ArchivedModuleCompareTest.java 8209534 generic-all
-runtime/appcds/cacheObject/ArchivedModuleComboTest.java 8209534 generic-all
-
serviceability/jvmti/FieldAccessWatch/FieldAccessWatch.java 8202482 generic-all
compiler/stable/TestStableBoolean.java 8204347 generic-all
--- a/test/hotspot/jtreg/runtime/appcds/cacheObject/CheckArchivedModuleApp.java Mon Sep 10 14:23:37 2018 -0700
+++ b/test/hotspot/jtreg/runtime/appcds/cacheObject/CheckArchivedModuleApp.java Mon Sep 10 18:30:24 2018 -0400
@@ -47,8 +47,16 @@
throw new RuntimeException(
"FAILED. Incorrect argument length: " + args.length);
}
+
boolean expectArchivedDescriptors = "yes".equals(args[0]);
boolean expectArchivedConfiguration = "yes".equals(args[1]);
+ // -XX:+EnableJVMCI adds extra system modules, in which case the system
+ // module objects are not archived.
+ if (wb.getBooleanVMFlag("EnableJVMCI")) {
+ expectArchivedDescriptors = false;
+ expectArchivedConfiguration = false;
+ }
+
checkModuleDescriptors(expectArchivedDescriptors);
checkConfiguration(expectArchivedConfiguration);
checkEmptyConfiguration(expectArchivedConfiguration);