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

Alan Bateman alanb at openjdk.org
Sat Nov 15 09:09:36 UTC 2025


On Sat, 15 Nov 2025 02:43:38 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. So I think the new added check `haveView == supported` is too strict on non-AIX systems. This PR make this check only on AIX.
>> 
>> Change has been verified locally on linux-aarch64.
>
> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add whithesapce after if

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

> 80:             boolean haveView = Files.getFileAttributeView(file, viewClass) != null;
> 81:             assertTrue(haveView == supported);
> 82:         }

I think we should replace L76-L77 with

if (supported) {
    assertNotNull(Files.getFileAttributeView(file, viewClass));
}

so no need for anything AIX specific here.

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

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


More information about the nio-dev mailing list