-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
libutil-tests: fix openFileEnsureBeneathNoSymlinks.works on cygwin #14953
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
Conversation
|
Hm, I do think that this is an issue with cygwin. From IEEE Std 1003.1-2008:
I think it's pretty clear that Cygwin is non-compliant here (if I'm not misreading the spec, but it's pretty clear-cut IMO) |
Specifically this. Actually this behavior is one of the important factors for safe NAR unpacking. See You can also just do GTEST_SKIP for this check since it's buggy. |
|
I just don't understand why this wouldn't be allowed to take precedence:
It does say "regardless of the contents of the symbolic link", but the O_NOFOLLOW description doesn't mention contents.
If we consider cygwin broken, I think I'd rather |
Hm the spec is indeed underspecified in that regard. I guess the best argument that we have for this is that FreeBSD, Darwin and Linux all return EEXIST here.
Sure. |
96e54b8 to
ac24ef8
Compare
|
Okay, I've made that change
This is also a decent argument for changing cygwin. I've already got at least one other posix fix for cygwin as a result of the nix tests, so I might attempt this as well. |
Might be best to double-check, but looking at some recent changes upstream I think that's the intenion https://reviews.freebsd.org/D50531:
|
Motivation
This fixes a test failure I get on cygwin.
Context
If I understand correctly, both of these conditions are true, so maybe cygwin isn't actually doing anything wrong? If so, we could check for both codes, but the fact that ELOOP gets turned into an exception makes that a little ugly.
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.