mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8370797: Test runtime/ErrorHandling/AccessZeroNKlassHitsProtectionZone.java failed on macos 26
Reviewed-by: stuefe, kvn
This commit is contained in:
parent
436dc687ba
commit
6080ccd232
@ -142,7 +142,11 @@ public class AccessZeroNKlassHitsProtectionZone {
|
||||
for (forceBase = start; forceBase < end; forceBase += step) {
|
||||
String thisBaseString = String.format("0x%016X", forceBase).toLowerCase();
|
||||
output = run_test(COH, CDS, thisBaseString);
|
||||
if (output.contains("CompressedClassSpaceBaseAddress=" + thisBaseString + " given, but reserving class space failed.")) {
|
||||
if (output.contains("CompressedClassSpaceBaseAddress=" + thisBaseString + " given, but reserving class space failed.") ||
|
||||
output.matches ("CompressedClassSpaceBaseAddress=" + thisBaseString + " given with shift .*, cannot be used to encode class pointers")) {
|
||||
// possible output:
|
||||
// CompressedClassSpaceBaseAddress=0x0000000c00000000 given, but reserving class space failed.
|
||||
// CompressedClassSpaceBaseAddress=0x0000000d00000000 given with shift 6, cannot be used to encode class pointers
|
||||
// try next one
|
||||
} else if (output.contains("Successfully forced class space address to " + thisBaseString)) {
|
||||
break;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -354,6 +354,27 @@ public final class OutputAnalyzer {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if stdout matches the given pattern
|
||||
*/
|
||||
public boolean stdoutMatches(String regexp) {
|
||||
return getStdout().matches(regexp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if stderr matches the given pattern
|
||||
*/
|
||||
public boolean stderrMatches(String regexp) {
|
||||
return getStderr().matches(regexp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if either stdout or stderr matches the given pattern
|
||||
*/
|
||||
public boolean matches(String regexp) {
|
||||
return stdoutMatches(regexp) || stderrMatches(regexp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify that the stdout and stderr contents of output buffer matches
|
||||
* the pattern
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user