8202282: [TESTBUG] appcds TestCommon.makeCommandLineForAppCDS() can be removed
Summary: removed the unnecessary makeCommandLineForAppCDS() method and its usage
Reviewed-by: iklam, jiangli
--- a/test/hotspot/jtreg/runtime/appcds/GraalWithLimitedMetaspace.java Thu Sep 27 01:25:42 2018 +0200
+++ b/test/hotspot/jtreg/runtime/appcds/GraalWithLimitedMetaspace.java Wed Sep 26 18:21:26 2018 -0700
@@ -87,7 +87,6 @@
static void dumpLoadedClasses(String[] expectedClasses) throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true,
- TestCommon.makeCommandLineForAppCDS(
"-XX:DumpLoadedClassList=" + CLASSLIST_FILE,
// trigger JVMCI runtime init so that JVMCI classes will be
// included in the classlist
@@ -95,7 +94,7 @@
"-cp",
TESTJAR,
TESTNAME,
- TEST_OUT));
+ TEST_OUT);
OutputAnalyzer output = TestCommon.executeAndLog(pb, "dump-loaded-classes")
.shouldHaveExitValue(0)
@@ -113,7 +112,6 @@
static void dumpArchive() throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true,
- TestCommon.makeCommandLineForAppCDS(
"-cp",
TESTJAR,
"-XX:SharedClassListFile=" + CLASSLIST_FILE,
@@ -121,7 +119,7 @@
"-Xlog:cds",
"-Xshare:dump",
"-XX:MetaspaceSize=12M",
- "-XX:MaxMetaspaceSize=12M"));
+ "-XX:MaxMetaspaceSize=12M");
OutputAnalyzer output = TestCommon.executeAndLog(pb, "dump-archive");
int exitValue = output.getExitValue();
--- a/test/hotspot/jtreg/runtime/appcds/TestCommon.java Thu Sep 27 01:25:42 2018 +0200
+++ b/test/hotspot/jtreg/runtime/appcds/TestCommon.java Wed Sep 26 18:21:26 2018 -0700
@@ -110,10 +110,6 @@
return createArchive(opts);
}
- public static String[] makeCommandLineForAppCDS(String... args) throws Exception {
- return args;
- }
-
// Create AppCDS archive using appcds options
public static OutputAnalyzer createArchive(AppCDSOptions opts)
throws Exception {
@@ -143,7 +139,7 @@
for (String s : opts.suffix) cmd.add(s);
String[] cmdLine = cmd.toArray(new String[cmd.size()]);
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, makeCommandLineForAppCDS(cmdLine));
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, cmdLine);
return executeAndLog(pb, "dump");
}
@@ -169,7 +165,7 @@
for (String s : opts.suffix) cmd.add(s);
String[] cmdLine = cmd.toArray(new String[cmd.size()]);
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, makeCommandLineForAppCDS(cmdLine));
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, cmdLine);
return executeAndLog(pb, "exec");
}
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java Thu Sep 27 01:25:42 2018 +0200
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java Wed Sep 26 18:21:26 2018 -0700
@@ -49,24 +49,22 @@
TestCommon.getSourceFile("SharedStringsBasic.txt").toString();
ProcessBuilder dumpPb = ProcessTools.createJavaProcessBuilder(true,
- TestCommon.makeCommandLineForAppCDS(
"-cp", appJar,
"-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile,
"-XX:SharedArchiveFile=./SharedStringsBasic.jsa",
"-Xshare:dump",
- "-Xlog:cds,cds+hashtables"));
+ "-Xlog:cds,cds+hashtables");
TestCommon.executeAndLog(dumpPb, "dump")
.shouldContain("Shared string table stats")
.shouldHaveExitValue(0);
ProcessBuilder runPb = ProcessTools.createJavaProcessBuilder(true,
- TestCommon.makeCommandLineForAppCDS(
"-cp", appJar,
"-XX:SharedArchiveFile=./SharedStringsBasic.jsa",
"-Xshare:auto",
"-showversion",
- "HelloString"));
+ "HelloString");
TestCommon.executeAndLog(runPb, "run").shouldHaveExitValue(0);
}
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java Thu Sep 27 01:25:42 2018 +0200
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java Wed Sep 26 18:21:26 2018 -0700
@@ -44,21 +44,19 @@
// SharedBaseAddress=0 puts the archive at a very high address on solaris,
// which provokes the crash.
ProcessBuilder dumpPb = ProcessTools.createJavaProcessBuilder(true,
- TestCommon.makeCommandLineForAppCDS(
"-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5",
"-cp", ".",
"-XX:SharedBaseAddress=0", "-XX:SharedArchiveFile=./SysDictCrash.jsa",
"-Xshare:dump",
- "-showversion", "-Xlog:cds,cds+hashtables"));
+ "-showversion", "-Xlog:cds,cds+hashtables");
TestCommon.checkDump(TestCommon.executeAndLog(dumpPb, "dump"));
ProcessBuilder runPb = ProcessTools.createJavaProcessBuilder(true,
- TestCommon.makeCommandLineForAppCDS(
"-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5",
"-XX:SharedArchiveFile=./SysDictCrash.jsa",
"-Xshare:on",
- "-version"));
+ "-version");
TestCommon.checkExec(TestCommon.executeAndLog(runPb, "exec"));
}