-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8334339: Test java/nio/file/attribute/BasicFileAttributeView/CreationTime.java fails on alinux3 #19737
Conversation
👋 Welcome back syan! A progress list of the required criteria for merging this PR into |
@sendaoYan This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 73 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@AlanBateman) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@sendaoYan The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
/issue JDK-8334339 |
@sendaoYan This issue is referenced in the PR title - it will now be updated. |
Would it be possible to say what |
In some situation, the ext4 file type doesn't support |
The concern with forking stat is that it complicates the test and creates more things to go wrong. If the change could be reduced to just skipping when the creation time is 0 then I think it should be okay. |
Thanks for the review, the |
test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java
Outdated
Show resolved
Hide resolved
test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java
Outdated
Show resolved
Hide resolved
test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java
Outdated
Show resolved
Hide resolved
test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java
Outdated
Show resolved
Hide resolved
test/jdk/java/nio/file/attribute/BasicFileAttributeView/CreationTime.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is okay. Yes it means that the test will pass if the the epoch is returned for the file creation time but it keeps the test simple.
Thanks for the review and suggestions. |
@sendaoYan |
/sponsor |
Going to push as commit 7baddc2.
Your commit was automatically rebased without conflicts. |
@AlanBateman @sendaoYan Pushed as commit 7baddc2. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Thanks for the sponsor. |
Hi all,
The testcase
java/nio/file/attribute/BasicFileAttributeView/CreationTime.java
fails on alinux3(alibaba cloud linux version 3) after JDK-8316304.The testcase use /tmp directory to create the file and get the createtime(birth time) of this file. But on alinux3(alibaba cloud linux version 3), the /tmp is mount as tmpfs, it's not a real physic disk paitition, it's mount from RAM, and the alinux3 doesn't support get the
birth time
on tmpfs.On ubuntu 22, when I create a file on /dev/shm(it's also a tmpfs type partition), stat also doesn't support
birth time
.According to the Java API doc, If the file system implementation does not support a time stamp to indicate the time when the file was created, the creationTime() API return the epoch (1970-01-01T00:00:00Z).
So in this PR, if the test directory(on linux the test directory is /tmp) doesn't support
birth time
, the test throw a jtreg.SkippedException, rather than report a failure.And in this PR, I create a new test, change the test directory from /tmp to
pwd
, which the current work directory maybe at diffrent partition to /tmp, and the current work directory supportbirth time
possibly.The change has been verified on below env:
windows-CreationTime.java.log
alinux3-CreationTime.java.log
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19737/head:pull/19737
$ git checkout pull/19737
Update a local copy of the PR:
$ git checkout pull/19737
$ git pull https://git.openjdk.org/jdk.git pull/19737/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19737
View PR using the GUI difftool:
$ git pr show -t 19737
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19737.diff
Webrev
Link to Webrev Comment