[TEST-BUG] JDK 9 RFR of 8173910: (fs) java/nio/file/FileSystem/Basic.java should conditionally check FileStores
Alan Bateman
Alan.Bateman at oracle.com
Mon Feb 6 10:30:20 UTC 2017
On 03/02/2017 22:07, Brian Burkhalter wrote:
> Please review at your convenience.
>
> Issue: https://bugs.openjdk.java.net/browse/JDK-8173910
> Patch: http://cr.openjdk.java.net/~bpb/8173910/webrev.00/
>
> Creation of a FileStore on Unix systems will hang if the stat(2) system call hangs which is the case for stale NFS mounts. The test is changed to spawn a ‘df’ command in a separate process and wait 90 seconds for that process to complete. If the process has not completed or its exit value is non-zero, the iteration over FileStores is omitted from the test. This should not affect most test runs and should suppress spurious failures due to stale NFS mounts.
>
Are there any other tests that run into this? I'm just wondering if this
might be needed in the test infrastructure libraries.
In any case, the approach seems okay although I think it would be better
to move it into its own method to avoid cluttering main. I also have a
small concern that it doesn't read the output/error streams from the
`df` command and so could hang if there is a lot of output. ProcessUtils
is probably useful for this.
-Alan
More information about the nio-dev
mailing list