# HG changeset patch # User mbaesken # Date 1574929389 -3600 # Thu Nov 28 09:23:09 2019 +0100 # Node ID d94c357fe866b7748a6d268348cdb85a1a2b695c # Parent 55fdee124e89dc2cc5c11a5abaad274bec88ba40 8234625: hs test serviceability/sa/ClhsdbCDSCore.java fails on macOS 10.15 diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java @@ -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.