Skip to content
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

Fails xfstests generic/221, UTIME_OMIT does not work #60

Closed
rfjakob opened this issue Sep 29, 2015 · 0 comments
Closed

Fails xfstests generic/221, UTIME_OMIT does not work #60

rfjakob opened this issue Sep 29, 2015 · 0 comments

Comments

@rfjakob
Copy link
Contributor

rfjakob commented Sep 29, 2015

xfstests generic/221 runs t_futimens.c, that executes the following syscall:

utimensat(3, NULL, {{1000000000, 0}, UTIME_OMIT}, 0) = -1 EINVAL (Invalid argument)

As you can see, it fails with EINVAL. Stracing the loopback process shows:

[pid 27783] utimes("/proc/self/fd/3", {{1000000000, 0}, {0, 1073741822}} <unfinished ...>
[pid 27783] <... utimes resumed> )      = -1 EINVAL (Invalid argument)

Note that 1073741822 == UTIME_OMIT. However, this special value only works for utimens and utimensat that take nanoseconds, not for utimes that only takes microseconds!

*** This is the last issue with the "generic" xfstests ***

Failing tests are now:

Everything else passes or is skipped.

rfjakob added a commit to rfjakob/go-fuse that referenced this issue Oct 4, 2015
Futimes() only takes microsecond resolution while the FUSE call
Utimens() wants nanosecond precision.

This is why UTIME_OMIT did not work - this change fixes issue hanwen#60.

The go library does not provide a FutimesNano() function which is
why I use UtimesNano() on /proc/self/fd/n.
This is what the Go library does in Futimes().
rfjakob added a commit to rfjakob/go-fuse that referenced this issue Oct 5, 2015
Futimes only takes microsecond resolution while the FUSE call
Utimens wants nanosecond precision. Switch from Futimes to Futimens.

This is why UTIME_OMIT did not work - this change fixes the failure
of xfstests generic/221 (issue hanwen#60).
rfjakob added a commit to rfjakob/go-fuse that referenced this issue Oct 11, 2015
Futimes only takes microsecond resolution while the FUSE call
Utimens wants nanosecond precision. Switch from Futimes to futimens.

This is why UTIME_OMIT did not work - this change fixes the failure
of xfstests generic/221 (issue hanwen#60).
@rfjakob rfjakob closed this as completed Oct 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant