-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
test.test_subprocess.POSIXProcessTestCase.test_user fails in the limited build environment #84036
Comments
When testing Python from Python-3.9.0a3.tar.xz two test cases file in the limited build environment for openSUSE. We have very limited number of users there: stitny:/home/abuild/rpmbuild/BUILD/Python-3.9.0a3 # cat /etc/passwd So, tests which expect existence of the user 'nobody' fail: [ 747s] ====================================================================== [ 747s] Traceback (most recent call last):
[ 747s] File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/test/test_subprocess.py", line 1805, in test_user
[ 747s] output = subprocess.check_output(
[ 747s] File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/subprocess.py", line 419, in check_output
[ 747s] return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
[ 747s] File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/subprocess.py", line 510, in run
[ 747s] with Popen(*popenargs, **kwargs) as process:
[ 747s] File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/subprocess.py", line 929, in __init__
[ 747s] uid = pwd.getpwnam(user).pw_uid
[ 747s] KeyError: "getpwnam(): name not found: 'nobody'"
[ 747s]
[ 747s] ====================================================================== [ 747s] Traceback (most recent call last):
[ 747s] File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/test/test_subprocess.py", line 1805, in test_user
[ 747s] output = subprocess.check_output(
[ 747s] File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/subprocess.py", line 419, in check_output
[ 747s] return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
[ 747s] File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/subprocess.py", line 510, in run
[ 747s] with Popen(*popenargs, **kwargs) as process:
[ 747s] File "/home/abuild/rpmbuild/BUILD/Python-3.9.0a3/Lib/subprocess.py", line 929, in __init__
[ 747s] uid = pwd.getpwnam(user).pw_uid
[ 747s] KeyError: "getpwnam(): name not found: 'nobody'"
[ 747s]
[ 747s] [ 747s] I am not sure what is the proper solution here. Whether test should be skipped if nobody doesn’t exist, or the test should switch to user 0, or the current user? |
Python 3.8 is not affected. I close the issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: