mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-04 20:18:49 +00:00
8234625: hs test serviceability/sa/ClhsdbCDSCore.java fails on macOS 10.15
Reviewed-by: clanger, iignatyev
This commit is contained in:
parent
b03ba9e300
commit
02f2c5ff95
@ -111,8 +111,20 @@ public class ClhsdbCDSCore {
|
||||
if (coreFileLocation == null) {
|
||||
if (Platform.isOSX()) {
|
||||
File coresDir = new File("/cores");
|
||||
if (!coresDir.isDirectory() || !coresDir.canWrite()) {
|
||||
throw new Error("cores is not a directory or does not have write permissions");
|
||||
if (!coresDir.isDirectory()) {
|
||||
throw new Error("cores is not a directory");
|
||||
}
|
||||
// the /cores directory is usually not writable on macOS 10.15
|
||||
final String osVersion = System.getProperty("os.version");
|
||||
if (osVersion == null) {
|
||||
throw new Error("Cannot query the 'os.version' property!");
|
||||
}
|
||||
if (!coresDir.canWrite()) {
|
||||
if (osVersion.startsWith("10.15")) {
|
||||
throw new SkippedException("/cores is not writable");
|
||||
} else {
|
||||
throw new Error("cores does not have write permissions");
|
||||
}
|
||||
}
|
||||
} else if (Platform.isLinux()) {
|
||||
// Check if a crash report tool is installed.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user