RFR: [XS] 8234625: hs test serviceability/sa/ClhsdbCDSCore.java fails on macOS 10.15
Ioi Lam
ioi.lam at oracle.com
Mon Nov 25 18:44:02 UTC 2019
Hi Matthis,
Similar code also exists in
test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java and
test/hotspot/jtreg/serviceability/sa/TestJmapCore.java.
Maybe it's a good time to pull out getCoreFileLocation into the test
library and also move the
if (coreFileLocation == null) {
if (Platform.isOSX()) {
...
} else if (Platform.isLinux()) {
...
}
code into getCoreFileLocation as well?
See https://bugs.openjdk.java.net/browse/JDK-8233533
Thanks
- Ioi
On 11/25/19 1:58 AM, Baesken, Matthias 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
>
> http://cr.openjdk.java.net/~mbaesken/webrevs/8234625.0/
>
>
> Best regards, Matthias
More information about the hotspot-dev
mailing list