RFR: 8338884: java/nio/file/attribute/BasicFileAttributeView/CreationTime.java#tmp fails on alinux3 [v4]
SendaoYan
syan at openjdk.org
Mon Aug 26 15:16:04 UTC 2024
On Mon, 26 Aug 2024 13:17:45 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 two additional commits since the last revision:
>
> - delete import java.io.BufferedReader; and -import java.io.InputStreamReader;
> - revert "use stat -c linux command line to determise support create time or not", and set nfs not suoport create time
`nfs` on linux also doesn't support create time:
> mount | grep "/vmfarm "
pepsi.jvm.alibaba.net:/vmfarm on /vmfarm type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=11.165.41.2,local_lock=none,addr=11.158.137.189)
> stat /vmfarm/mountVmFarm.sh
File: ‘/vmfarm/mountVmFarm.sh’
Size: 71 Blocks: 8 IO Block: 1048576 regular file
Device: 3ch/60d Inode: 12 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2024-02-28 17:03:54.713251462 +0800
Modify: 2020-03-03 11:56:41.548038922 +0800
Change: 2020-03-03 11:56:41.548038922 +0800
Birth: -
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20687#issuecomment-2310458149
More information about the nio-dev
mailing list