Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8202282: [TESTBUG] appcds TestCommon.makeCommandLineForAppCDS() can be removed #2313

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -87,7 +87,6 @@ public static List<String> toClassNames(String filename) throws IOException {

static void dumpLoadedClasses(String[] expectedClasses) throws Exception {
ProcessBuilder pb = ProcessTools.createTestJvm(
TestCommon.makeCommandLineForAppCDS(
"-XX:DumpLoadedClassList=" + CLASSLIST_FILE,
// trigger JVMCI runtime init so that JVMCI classes will be
// included in the classlist
Expand All @@ -97,7 +96,7 @@ static void dumpLoadedClasses(String[] expectedClasses) throws Exception {
"-cp",
TESTJAR,
TESTNAME,
TEST_OUT));
TEST_OUT);

OutputAnalyzer output = TestCommon.executeAndLog(pb, "dump-loaded-classes")
.shouldHaveExitValue(0)
Expand All @@ -115,15 +114,14 @@ static void dumpLoadedClasses(String[] expectedClasses) throws Exception {

static void dumpArchive() throws Exception {
ProcessBuilder pb = ProcessTools.createTestJvm(
TestCommon.makeCommandLineForAppCDS(
"-cp",
TESTJAR,
"-XX:SharedClassListFile=" + CLASSLIST_FILE,
"-XX:SharedArchiveFile=" + ARCHIVE_FILE,
"-Xlog:cds",
"-Xshare:dump",
"-XX:MetaspaceSize=12M",
"-XX:MaxMetaspaceSize=12M"));
"-XX:MaxMetaspaceSize=12M");

OutputAnalyzer output = TestCommon.executeAndLog(pb, "dump-archive");
int exitValue = output.getExitValue();
Expand Down
4 changes: 0 additions & 4 deletions test/hotspot/jtreg/runtime/appcds/TestCommon.java
Expand Up @@ -114,10 +114,6 @@ public static OutputAnalyzer createArchive(String appJar, String appClasses[],
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 {
Expand Down
Expand Up @@ -49,24 +49,22 @@ public static void main(String[] args) throws Exception {
TestCommon.getSourceFile("SharedStringsBasic.txt").toString();

ProcessBuilder dumpPb = ProcessTools.createTestJvm(
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.createTestJvm(
TestCommon.makeCommandLineForAppCDS(
"-cp", appJar,
"-XX:SharedArchiveFile=./SharedStringsBasic.jsa",
"-Xshare:auto",
"-showversion",
"HelloString"));
"HelloString");

TestCommon.executeAndLog(runPb, "run").shouldHaveExitValue(0);
}
Expand Down
Expand Up @@ -44,21 +44,19 @@ public static void main(String[] args) throws Exception {
// SharedBaseAddress=0 puts the archive at a very high address on solaris,
// which provokes the crash.
ProcessBuilder dumpPb = ProcessTools.createTestJvm(
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.createTestJvm(
TestCommon.makeCommandLineForAppCDS(
"-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5",
"-XX:SharedArchiveFile=./SysDictCrash.jsa",
"-Xshare:on",
"-version"));
"-version");

TestCommon.checkExec(TestCommon.executeAndLog(runPb, "exec"));
}
Expand Down