8209534: [TESTBUG]runtime/appcds/cacheObject/ArchivedModuleCompareTest.java fails with EnableJVMCI

Use TestCommon.execOff().

Reviewed-by: ccheung
This commit is contained in:
Jiangli Zhou 2018-08-28 14:45:34 -04:00
parent 1b02e70184
commit 1ddabdf0dc

View file

@ -50,16 +50,11 @@ public class ArchivedModuleCompareTest {
TestCommon.list("PrintSystemModulesApp")); TestCommon.list("PrintSystemModulesApp"));
TestCommon.checkDump(output); TestCommon.checkDump(output);
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( output = TestCommon.execOff("-cp", appJar, "PrintSystemModulesApp");
"-cp", appJar,
"-Xshare:off",
"PrintSystemModulesApp");
output = TestCommon.executeAndLog(pb, "print.system.module.share.off");
output.shouldHaveExitValue(0); output.shouldHaveExitValue(0);
String bootModules1 = output.getStdout(); String bootModules1 = output.getStdout();
output = TestCommon.exec(appJar, output = TestCommon.exec(appJar, "PrintSystemModulesApp");
"PrintSystemModulesApp");
TestCommon.checkExec(output); TestCommon.checkExec(output);
if (output.getStderr().contains("sharing")) { if (output.getStderr().contains("sharing")) {
String bootModules2 = output.getStdout(); String bootModules2 = output.getStdout();
@ -70,11 +65,9 @@ public class ArchivedModuleCompareTest {
// Verify --show-module-resolution output with the output from // Verify --show-module-resolution output with the output from
// -Xshare:off run // -Xshare:off run
System.out.println("---------------- Test case 2 -----------------"); System.out.println("---------------- Test case 2 -----------------");
pb = ProcessTools.createJavaProcessBuilder( output = TestCommon.execOff("-cp", appJar,
"-Xshare:off",
"--show-module-resolution", "--show-module-resolution",
"-version"); "-version");
output = TestCommon.executeAndLog(pb, "show.module.resolution.share.off");
output.shouldHaveExitValue(0); output.shouldHaveExitValue(0);
String moduleResolutionOut1 = output.getStdout(); String moduleResolutionOut1 = output.getStdout();