RFR: 8371697: test/jdk/java/nio/file/FileStore/Basic.java fails after 8360887 on linux [v6]

Alan Bateman alanb at openjdk.org
Mon Nov 17 06:56:03 UTC 2025


On Mon, 17 Nov 2025 02:36:43 GMT, SendaoYan <syan at openjdk.org> wrote:

>> Hi all,
>> 
>> The new method testFileAttributes in test/jdk/java/nio/file/FileStore/Basic.java added by [JDK-8360887](https://bugs.openjdk.org/browse/JDK-8360887)/[JDK-8361183](https://bugs.openjdk.org/browse/JDK-8361183) fails on some linux machines. A FileSystemProvider may support many views but some of these attributes in these views may not supported on all FileStores.
>> 
>> Change has been verified locally on linux-aarch64.
>
> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add the comment

test/jdk/java/nio/file/FileStore/Basic.java line 41:

> 39: import jdk.test.lib.Platform;
> 40: import jdk.test.lib.util.FileUtils;
> 41: import jdk.test.lib.Asserts;

If this test is now using jdk.test.lib.Asserts then we should the assertTrue method, and create an issue to remind us to move this to JUnit.

test/jdk/java/nio/file/FileStore/Basic.java line 80:

> 78:         // in these views may not supported on all FileStores.
> 79:         // So we only check for non-null view if the store supports the view.
> 80:         if (supported) {

I would prefer if the comment said something like "If the view is supported by the FileStore then Files.getFileAttributeView should return return that view".

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28281#discussion_r2532907241
PR Review Comment: https://git.openjdk.org/jdk/pull/28281#discussion_r2532911416


More information about the nio-dev mailing list