RFR: [XS] 8234625: hs test serviceability/sa/ClhsdbCDSCore.java fails on macOS 10.15
Igor Ignatyev
igor.ignatyev at oracle.com
Mon Nov 25 20:09:30 UTC 2019
Hi Matthias,
your solution will hide the fact that the coverage from this test will be missed on macos 10.15+. I'd recommend you to use jtreg.SkippedException to signal that the test can't be run or to introduce new @requires property, say `env.core.accessible`, which is true iif core dumping is enabled and dumped cores can be accessed from the test code.
-- Igor
> On Nov 25, 2019, at 1:58 AM, Baesken, Matthias <matthias.baesken at sap.com> wrote:
>
> Hello, the test
> serviceability/sa/ClhsdbCDSCore.java
> 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 :
>
> https://bugs.openjdk.java.net/browse/JDK-8234625 <https://bugs.openjdk.java.net/browse/JDK-8234625>
>
> http://cr.openjdk.java.net/~mbaesken/webrevs/8234625.0/ <http://cr.openjdk.java.net/~mbaesken/webrevs/8234625.0/>
>
>
> Best regards, Matthias
More information about the hotspot-dev
mailing list