Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: TestLockOSThreadExit failing on arm64 builder #29366
The failures started at d0f8a75 (runtime: don't clear lockedExt on locked M when G exits), which slightly changed the test.
It looks like on linux/arm64 for whatever reason unshare(CLONE_FS) is either unsupported, or just not allowed to be executed by the user running the tests.
If I were to take a wild guess, it might have to do with the way the arm64 builders are containerized. If there's a security issue with enabling unshare, then I'm happy to just disable the test on arm64. It's an easy fix.
In that case, it's somewhat unclear to me what the correct fix is.
Thinking about this more, I'm not sure I like disabling the test for arm64, since it's not a property of linux/arm64 that the test fails. If the test is running in any environment where certain syscalls are unavailable then there's not much one can do.
Ideally I'd like to just have the test fail gracefully if it doesn't have permissions to execute a certain syscall. However, this is more dangerous and confusing since if all the builders stop letting the tests call unshare, then we wouldn't notice, and the test could be passing even if the functionality is broken.
So, I decided to put up a change to just disable the test. Let me know if this seems reasonable. I poked around and it seems like some of the other tests are turned off for different platforms for builder reasons, so I figured it was OK.
I think it would be good that we skip the test on platforms that doesn't support, maybe by testing kernel configurations or trying a syscall. So users won't see this kind of failures if they have such configurations.
For the concern of actually testing the functionality, I guess we could require the tests not to be skipped on certain builders? I.e., something like