RFR: [XS] 8234625: hs test serviceability/sa/ClhsdbCDSCore.java fails on macOS 10.15

Baesken, Matthias matthias.baesken at sap.com
Mon Nov 25 09:58:24 UTC 2019

Hello,   the test
fails on macOS 10.15 .
exception :
java.lang.Error: cores is not a directory or does not have write permissions
                at ClhsdbCDSCore.main(ClhsdbCDSCore.java:115)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.base/java.lang.reflect.Method.invoke(Method.java:564)
                at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
                at java.base/java.lang.Thread.run(Thread.java:833)

Looks like the test checks that directory /cores is writable :
File coresDir = new File("/cores");
if (!coresDir.isDirectory() || !coresDir.canWrite()) { ... // fail
However on macOS 10.15 /cores is not writable any more (at least for most users, including our test user).
So the test fails.

My change adjusts the test, so that it gives a clearer error message,  and  returns gracefully in case  we are running on macOS 10.15 and notice a non-writeable /cures directory .

Bug/webrev :



Best regards, Matthias

More information about the hotspot-dev mailing list