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

SendaoYan syan at openjdk.org
Fri Aug 23 16:31:06 UTC 2024


On Fri, 23 Aug 2024 03:58:37 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.

As descript in [JDK-8338884](https://bugs.openjdk.org/browse/JDK-8338884), this test will report fails `java.lang.RuntimeException: Creation time should not have changed` without this change.
On alinux3(alibaba cloud system v3) the /tmp disk partition is mounted as tmpfs filesystem, and linux doesn't support birth time with this type filesystem. 
Without this change before the fix [JDK-8338696](https://bugs.openjdk.org/browse/JDK-8338696) is applied, `then the creation time is set to the epoch (1970-01-01T00:00:00Z)` so this test will [throw](https://github.com/openjdk/jdk/blob/master/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java#L84) `SkippedException`. 
Without this change after the fix [JDK-8338696](https://bugs.openjdk.org/browse/JDK-8338696) is applied, the `SkippedException` do not throw any more, and the `supportsCreationTimeRead` set to true, actually on alinux3 the file in /tmp partition doesn't support create time(birth time), and create time always equals to modified time, then this test report [fails](https://github.com/openjdk/jdk/blob/master/test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java#L126).

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

PR Comment: https://git.openjdk.org/jdk/pull/20687#issuecomment-2307412888


More information about the nio-dev mailing list