8209534: [TESTBUG]runtime/appcds/cacheObject/ArchivedModuleCompareTest.java fails with EnableJVMCI.
authorjiangli
Tue, 28 Aug 2018 14:45:34 -0400
changeset 51547 2b004d807187
parent 51546 b9f6a4427da9
child 51548 35a6956f4243
child 56872 d55ba070479e
8209534: [TESTBUG]runtime/appcds/cacheObject/ArchivedModuleCompareTest.java fails with EnableJVMCI. Summary: Use TestCommon.execOff(). Reviewed-by: ccheung
test/hotspot/jtreg/runtime/appcds/cacheObject/ArchivedModuleCompareTest.java
--- a/test/hotspot/jtreg/runtime/appcds/cacheObject/ArchivedModuleCompareTest.java	Tue Aug 28 12:57:40 2018 -0400
+++ b/test/hotspot/jtreg/runtime/appcds/cacheObject/ArchivedModuleCompareTest.java	Tue Aug 28 14:45:34 2018 -0400
@@ -50,16 +50,11 @@
                         TestCommon.list("PrintSystemModulesApp"));
         TestCommon.checkDump(output);
 
-        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-                                 "-cp", appJar,
-                                 "-Xshare:off",
-                                 "PrintSystemModulesApp");
-        output = TestCommon.executeAndLog(pb, "print.system.module.share.off");
+        output = TestCommon.execOff("-cp", appJar, "PrintSystemModulesApp");
         output.shouldHaveExitValue(0);
         String bootModules1 = output.getStdout();
 
-        output = TestCommon.exec(appJar,
-                                 "PrintSystemModulesApp");
+        output = TestCommon.exec(appJar, "PrintSystemModulesApp");
         TestCommon.checkExec(output);
         if (output.getStderr().contains("sharing")) {
             String bootModules2 = output.getStdout();
@@ -70,11 +65,9 @@
         // Verify --show-module-resolution output with the output from
         // -Xshare:off run
         System.out.println("---------------- Test case 2 -----------------");
-        pb = ProcessTools.createJavaProcessBuilder(
-                                 "-Xshare:off",
-                                 "--show-module-resolution",
-                                 "-version");
-        output = TestCommon.executeAndLog(pb, "show.module.resolution.share.off");
+        output = TestCommon.execOff("-cp", appJar,
+                                    "--show-module-resolution",
+                                    "-version");
         output.shouldHaveExitValue(0);
         String moduleResolutionOut1 = output.getStdout();