-
Notifications
You must be signed in to change notification settings - Fork 644
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
fcntl update following up with F_GETPATH but with FreeBSD's F_KINFO f… #2152
Conversation
070f7d9
to
f387353
Compare
4f6808a
to
32578dd
Compare
I was able to reproduce the test failure when I set TMPDIR to UFS, but not ZFS or TMPFS. I believe the CI environment uses UFS. Then I found this gem on the mailing list:
And indeed, if I reopen the tempfile by its path, then the test passes on UFS. Like this: let tmp = NamedTempFile::new().unwrap();
let tmp2 = File::open(tmp.path()).unwrap();
let fd = tmp2.as_raw_fd();
let mut path = PathBuf::new();
let res = fcntl(fd, FcntlArg::F_KINFO(&mut path)).expect("get path failed"); https://lists.freebsd.org/archives/freebsd-hackers/2022-May/001108.html |
Nice find ! I no longer use UFS since ages I did not think of it. |
32578dd
to
b815ba1
Compare
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.
Could you please add a CHANGELOG entry? And add a comment to the test explaining why it opens the file twice? That part looks very non-obvious.
b815ba1
to
301e8b3
Compare
efe0379
to
97b5403
Compare
…lag support instead
97b5403
to
7d85d70
Compare
Thanks! |
…lag support instead