8202282: [TESTBUG] appcds TestCommon.makeCommandLineForAppCDS() can be removed
Removed the unnecessary makeCommandLineForAppCDS() method and its usage Reviewed-by: iklam, jiangli
This commit is contained in:
parent
6d6b22c277
commit
5108d2e1dd
@ -87,7 +87,6 @@ public class GraalWithLimitedMetaspace {
|
||||
|
||||
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 @@ public class GraalWithLimitedMetaspace {
|
||||
"-cp",
|
||||
TESTJAR,
|
||||
TESTNAME,
|
||||
TEST_OUT));
|
||||
TEST_OUT);
|
||||
|
||||
OutputAnalyzer output = TestCommon.executeAndLog(pb, "dump-loaded-classes")
|
||||
.shouldHaveExitValue(0)
|
||||
@ -113,7 +112,6 @@ public class GraalWithLimitedMetaspace {
|
||||
|
||||
static void dumpArchive() throws Exception {
|
||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true,
|
||||
TestCommon.makeCommandLineForAppCDS(
|
||||
"-cp",
|
||||
TESTJAR,
|
||||
"-XX:SharedClassListFile=" + CLASSLIST_FILE,
|
||||
@ -121,7 +119,7 @@ public class GraalWithLimitedMetaspace {
|
||||
"-Xlog:cds",
|
||||
"-Xshare:dump",
|
||||
"-XX:MetaspaceSize=12M",
|
||||
"-XX:MaxMetaspaceSize=12M"));
|
||||
"-XX:MaxMetaspaceSize=12M");
|
||||
|
||||
OutputAnalyzer output = TestCommon.executeAndLog(pb, "dump-archive");
|
||||
int exitValue = output.getExitValue();
|
||||
|
@ -110,10 +110,6 @@ public class TestCommon extends CDSTestUtils {
|
||||
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 @@ public class TestCommon extends CDSTestUtils {
|
||||
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 @@ public class TestCommon extends CDSTestUtils {
|
||||
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");
|
||||
}
|
||||
|
||||
|
@ -49,24 +49,22 @@ public class SharedStringsBasic {
|
||||
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);
|
||||
}
|
||||
|
@ -44,21 +44,19 @@ public class SysDictCrash {
|
||||
// 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"));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user