-
Notifications
You must be signed in to change notification settings - Fork 241
cuda.bindings.nvml: Correctly handle a test requiring root #1515
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
base: main
Are you sure you want to change the base?
Conversation
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test |
|
|
/ok to test |
1 similar comment
|
/ok to test |
|
This is proving to be a challenge. On some of our CI runners, all signs indicate that the user is the root user (uid == 0, a member of gid == 0) etc., but the API call still fails as We know, however, that SWQA has able to run as root and get this API call to pass (which then caused the original test to fail). I'm thinking I'll just rewrite the test so that it will be robust to the call failing or passing regardless of the user's status, but that's a workaround. Anyone else run into this issue and have a better solution? |
|
@mdboom since nvml does some pretty low level system interactions, things can be somewhat arbitrarily blocked off via things like seccomp policies even if we can detect we're in a container or anything else reasonable. I think your approach of treating getting |
e53a1b5 to
a8b5bcc
Compare
|
/ok to test |
The
cuda.bindings.nvmltests were written with the assumption that they would be run by a non-root user (as is the case in our CI). SWQA seemingly is running some tests as root, which then causes the test to fail. This change makes the test robust to either situation.