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

8274838: runtime/cds/appcds/TestSerialGCWithCDS.java fails on Windows #5839

Closed
wants to merge 2 commits into from
Closed
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
@@ -97,7 +97,8 @@ static void test(boolean dumpWithSerial, boolean execWithSerial, boolean useSmal
// a small SerialGC heap that may be too small.
String[] sizes = {
"4m", // usually this will success load the archived heap
"2m", // usually this will fail to loade th archived heap, but app can launch
"2m", // usually this will fail to load the archived heap, but app can launch
// or fail with "GC triggered before VM initialization completed"
"1m" // usually this will cause VM launch to fail with "Too small maximum heap"
};
for (String sz : sizes) {
@@ -113,7 +114,12 @@ static void test(boolean dumpWithSerial, boolean execWithSerial, boolean useSmal
if (out.getExitValue() == 0) {
out.shouldContain(HELLO);
} else {
out.shouldContain("Too small maximum heap");
String output = out.getStdout() + out.getStderr();
String exp1 = "Too small maximum heap";
String exp2 = "GC triggered before VM initialization completed";
if (!output.contains(exp1) && !output.contains(exp2)) {
throw new RuntimeException("Either '" + exp1 + "' or '" + exp2 + "' must be in stdout/stderr \n");
}
Copy link
Member

@hseigel hseigel Oct 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the RuntimeException message to something like "Either " + exp1 + " or " + exp2 + "must be in stdout/stderr"

Otherwise, it sounds like both messages are needed.

Copy link
Member Author

@DamonFool DamonFool Oct 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the RuntimeException message to something like "Either " + exp1 + " or " + exp2 + "must be in stdout/stderr"

Otherwise, it sounds like both messages are needed.

Updated.
Thanks.

}
n++;
}