RFR: 8338884: java/nio/file/attribute/BasicFileAttributeView/CreationTime.java#tmp fails on alinux3 [v2]

SendaoYan syan at openjdk.org
Sat Aug 24 10:50:36 UTC 2024


On Fri, 23 Aug 2024 17:02:13 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   merge Linker.nativeLinker().defaultLookup().find("statx").isPresent() and !Files.getFileStore(file).type().contentEquals("tmpfs")
>
> test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java line 112:
> 
>> 110:             supportsCreationTimeRead = Linker.nativeLinker().defaultLookup().find("statx").isPresent();
>> 111:             // Linux system doesn't support birth time on tmpfs filesystem for now
>> 112:             if( Files.getFileStore(file).type().contentEquals("tmpfs") ) {
> 
> `if( ` should be `if (` but I would suggest instead:
> 
> 
> // Creation time read depends on statx system call support and on the file
> // system storing the birth time. The tmpfs file system type does not store
> // the birth time.
> boolean statxIsPresent = Linker.nativeLinker().defaultLookup().find("statx").isPresent();
> if (statxIsPresent && !Files.getFileStore(file).type().contentEquals("tmpfs")) {
>     supportsCreationTimeRead = true;
> }

Thanks for your review and suggestion. The code has been updated accroding your suggestion.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20687#discussion_r1729934854


More information about the nio-dev mailing list