# HG changeset patch # User jiangli # Date 1535481934 14400 # Node ID 2b004d807187234158806526dddc2c480eb59368 # Parent b9f6a4427da9ee5107820d5789942e3f590e182d 8209534: [TESTBUG]runtime/appcds/cacheObject/ArchivedModuleCompareTest.java fails with EnableJVMCI. Summary: Use TestCommon.execOff(). Reviewed-by: ccheung diff -r b9f6a4427da9 -r 2b004d807187 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();