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

Alan Bateman alanb at openjdk.org
Mon Aug 26 12:25:04 UTC 2024


On Mon, 26 Aug 2024 12:17:36 GMT, SendaoYan <syan at openjdk.org> wrote:

>> Hi all,
>> On alinux3(alibaba cloud linux version 3) system, the `/tmp` disk partition is mounted as tmpfs filesystem type, this filesystem type doesn't support create time(birth time).
>> 
>> Before this PR, this test [check](https://github.com/openjdk/jdk/blob/master/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java#L110) if there is `statx` system call present or not to determise the test environment support birth time or not. I think it's not enough when the tested filesystem type is `tmpfs`. When the tested filesystem type is `tmpfs`, then the tested file doesn't support birth time.
>> 
>> Test fix only, the change has been verified, no risk.
>
> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   use stat -c linux command line to determise support create time or not

test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java line 166:

> 164:             if (l != null && l.equals("-")) { return false; }
> 165:         } catch(Exception e) {
> 166:         }

This has several bugs, there is test is test infrastructure to do this correctly. My preference would be not include a launch of "stat" if possible.

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

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


More information about the nio-dev mailing list