RFR: 8376700: java/nio/file/DirectoryStream/SecureDS.java fails AtomicMoveNotSupportedException
SendaoYan
syan at openjdk.org
Thu Jan 29 13:18:58 UTC 2026
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.
-------------
Commit messages:
- 8376700: java/nio/file/DirectoryStream/SecureDS.java fails AtomicMoveNotSupportedException
Changes: https://git.openjdk.org/jdk/pull/29487/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29487&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8376700
Stats: 31 lines in 1 file changed: 22 ins; 5 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/29487.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29487/head:pull/29487
PR: https://git.openjdk.org/jdk/pull/29487
More information about the nio-dev
mailing list