8210515: [TESTBUG]CheckArchivedModuleApp.java needs to check if EnableJVMCI is set.
authorjiangli
Mon, 10 Sep 2018 18:30:24 -0400
changeset 51688 fd3b632801aa
parent 51687 1e39953aaed8
child 51689 9d89c0835ac1
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
test/hotspot/jtreg/ProblemList-graal.txt
test/hotspot/jtreg/runtime/appcds/cacheObject/CheckArchivedModuleApp.java
--- 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);