8229280: Test failures on several linux hosts after JDK-8181493

Alan Bateman Alan.Bateman at oracle.com
Wed Sep 4 18:44:57 UTC 2019


On 04/09/2019 19:40, Brian Burkhalter wrote:
> :
>
> With the @modules tag as above compilation fails:
>
>         // Check whether futimens() system call is supported
>         Method futimensSupported =
> sun.nio.fs.UnixNativeDispatcher.class.getDeclaredMethod("futimensSupported");
>         futimensSupported.setAccessible(true);
>         if (!(boolean)futimensSupported.invoke(null)) {
>             System.err.println
>                 ("futimens() system call not supported; skipping test");
>             return;
>         }
>
> java/nio/file/attribute/BasicFileAttributeView/SetTimesNanos.java:45: 
> error: UnixNativeDispatcher is not public in sun.nio.fs; cannot be 
> accessed from outside package
> sun.nio.fs.UnixNativeDispatcher.class.getDeclaredMethod("futimensSupported");
>                       ^
> 1 error
It looks like you've changed it from Class.forName to a static 
reference. I didn't suggest that, instead I was pointing out that you 
need the +open to ensure that sun.nio.fs is open to the test for deep 
reflective purposes.

>
> Sure. These types at least would work: apfs, ext4, xfs, zfs. That 
> would get rid of ugly truncation checking.
>
That would be good as it would limit the test to scenarios where it is 
expected to pass.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190904/753740b5/attachment.html>


More information about the nio-dev mailing list