-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
os: file write permission ignored on linux trybots #69561
Comments
Is it possible that the trybot is running the tests as root? I'm checking that possibility in https://go.dev/cl/614377. |
Yes, that is why. I think these tests will have to be skipped for root. We have similar skips in, for example, |
It's likely related that linux-386 and linux-amd64 builders are configured to run with a no-network check: Whose current implementation uses If so, the key to reproducing locally is to run the test in the same way:
|
In build 8736249311634815793 (a shard of a real linux-amd64 build on CL 614296, whose no_network property is true) TestCreateFilePermissions fails.
So it's confirmed as the relevant variable. Shadow build launch command details
|
I had managed to completely forget that root gets to ignore file modes. Thanks for a mystery solved! |
https://go.dev/cl/614296 includes a simple test of file permissions:
This test passes for me locally. It fails on linux-386 and linux-amd64 trybots. (It passes on wasip1 builders, ignore that, wasip1 doesn't support file permissions.)
Confusingly, it passes on linux gomotes. I can't replicate the trybot failure anywhere.
Logging in the test confirms that the file is being created with mode 0444. We're still able to write to it.
I have no idea what's going on here; I assume it's some trybot weirdness rather than our bug, but I don't know what might cause it.
The text was updated successfully, but these errors were encountered: