RFR: 8376700: java/nio/file/DirectoryStream/SecureDS.java fails AtomicMoveNotSupportedException
Brian Burkhalter
bpb at openjdk.org
Thu Jan 29 18:46:35 UTC 2026
On Thu, 29 Jan 2026 13:11:10 GMT, SendaoYan <syan at openjdk.org> wrote:
> Hi all,
>
> Before this PR, if the jtreg work directory and the /tmp directory locate in different linux volume or disk partition, test will report fails "java.nio.file.AtomicMoveNotSupportedException: file -> file: Invalid cross-device link". The linux syscall `rename()` doesn't support rename file across different volume, so I think the AtomicMoveNotSupportedException is not a JVM bug.
>
> This PR try to catch the AtomicMoveNotSupportedException and throw a SkippedException rather report fails. And split this test as two tests, one test for the default temporary directory '/tmp', another test for current jtreg work directory, this will make sure at least one test run non-skipped.
test/jdk/java/nio/file/DirectoryStream/SecureDS.java line 30:
> 28: * @library .. /test/lib
> 29: * @build jdk.test.lib.Platform
> 30: * @run main SecureDS
Might be good to add
* @build jtreg.SkippedException
before the `@run` action.
test/jdk/java/nio/file/DirectoryStream/SecureDS.java line 37:
> 35: * @library .. /test/lib
> 36: * @build jdk.test.lib.Platform
> 37: * @run main SecureDS cwd
As above, add `@build jtreg.SkippedException`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29487#discussion_r2743014440
PR Review Comment: https://git.openjdk.org/jdk/pull/29487#discussion_r2743015658
More information about the nio-dev
mailing list