RFR: 8376700: java/nio/file/DirectoryStream/SecureDS.java fails AtomicMoveNotSupportedException [v5]
SendaoYan
syan at openjdk.org
Fri Jan 30 01:07:38 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.
SendaoYan has updated the pull request incrementally with two additional commits since the last revision:
- Update comment
- Re-throw the AtomicMoveNotSupportedException if renmae between the same FileStore
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/29487/files
- new: https://git.openjdk.org/jdk/pull/29487/files/c78523f6..b80b72dc
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=29487&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=29487&range=03-04
Stats: 7 lines in 1 file changed: 6 ins; 0 del; 1 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