OpenJDK / jdk / jdk
changeset 57148:7089399d6ade
8234625: hs test serviceability/sa/ClhsdbCDSCore.java fails on macOS 10.15
Reviewed-by: clanger, iignatyev
author | mbaesken |
---|---|
date | Thu, 28 Nov 2019 09:23:09 +0100 |
parents | 753ab8dcdbba |
children | 70021dbed82b |
files | test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java |
diffstat | 1 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java Thu Nov 28 22:29:07 2019 -0800 +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java Thu Nov 28 09:23:09 2019 +0100 @@ -111,8 +111,20 @@ 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.