Skip to content

Commit

Permalink
8264569: Remove obsolete error messages from CDSTestUtils.java
Browse files Browse the repository at this point in the history
Reviewed-by: iklam
  • Loading branch information
yminqi committed Apr 19, 2021
1 parent 235daea commit b703e0a
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions test/lib/jdk/test/lib/cds/CDSTestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public class CDSTestUtils {
"UseSharedSpaces: Unable to allocate region, range is not within java heap.";
public static final String MSG_RANGE_ALREADT_IN_USE =
"Unable to allocate region, java heap range is already in use.";

public static final String MSG_DYNAMIC_NOT_SUPPORTED =
"DynamicDumpSharedSpaces is unsupported when base CDS archive is not loaded";
public static final boolean DYNAMIC_DUMP = Boolean.getBoolean("test.dynamic.cds.archive");

public interface Checker {
Expand Down Expand Up @@ -352,17 +353,8 @@ public static void checkCommonExecExceptions(OutputAnalyzer output) throws Excep
// could also improve usability in the field.
public static boolean isUnableToMap(OutputAnalyzer output) {
String outStr = output.getOutput();
if ((output.getExitValue() == 1) && (
outStr.contains("Unable to reserve shared space at required address") ||
outStr.contains("Unable to map ReadOnly shared space at required address") ||
outStr.contains("Unable to map ReadWrite shared space at required address") ||
outStr.contains("Unable to map MiscData shared space at required address") ||
outStr.contains("Unable to map MiscCode shared space at required address") ||
outStr.contains("Unable to map OptionalData shared space at required address") ||
outStr.contains("Could not allocate metaspace at a compatible address") ||
outStr.contains("UseSharedSpaces: Unable to allocate region, range is not within java heap") ||
outStr.contains("DynamicDumpSharedSpaces is unsupported when base CDS archive is not loaded") ))
{
if ((output.getExitValue() == 1) &&
(outStr.contains(MSG_RANGE_NOT_WITHIN_HEAP) || outStr.contains(MSG_DYNAMIC_NOT_SUPPORTED))) {
return true;
}

Expand Down

1 comment on commit b703e0a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.