gh-104522: Fix test_subprocess failure when build Python in the root home directory#114236
Conversation
… root home directory EPERM is raised when setreuid() fails. EACCES is set in execve() when the test user has not access to sys.executable.
|
!buildbot root |
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit 8fb5878 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
| if e.errno == errno.EACCES: | ||
| self.assertEqual(e.filename, sys.executable) | ||
| else: | ||
| self.assertIsNone(e.filename) |
There was a problem hiding this comment.
Strictly speaking, EPERM can be set in execve() in some circumstances. e.filename will be equal to sys.executable then. But I do not think that they are related to Python tests.
|
I've adjusted the comment. Hope you don't mind me pushing directly. (GitHub doesn't allow suggestions for code that's too far away from the change.) |
|
Thanks @serhiy-storchaka for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
… root home directory (pythonGH-114236) * pythongh-104522: Fix test_subprocess failure when build Python in the root home directory EPERM is raised when setreuid() fails. EACCES is set in execve() when the test user has not access to sys.executable. (cherry picked from commit 311d1e2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
Sorry, @serhiy-storchaka and @encukou, I could not cleanly backport this to |
|
GH-114239 is a backport of this pull request to the 3.12 branch. |
|
Thanks @serhiy-storchaka for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
… root home directory (pythonGH-114236) * pythongh-104522: Fix test_subprocess failure when build Python in the root home directory EPERM is raised when setreuid() fails. EACCES is set in execve() when the test user has not access to sys.executable. (cherry picked from commit 311d1e2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-114245 is a backport of this pull request to the 3.11 branch. |
… root home directory (pythonGH-114236) * pythongh-104522: Fix test_subprocess failure when build Python in the root home directory EPERM is raised when setreuid() fails. EACCES is set in execve() when the test user has not access to sys.executable.
… root home directory (pythonGH-114236) * pythongh-104522: Fix test_subprocess failure when build Python in the root home directory EPERM is raised when setreuid() fails. EACCES is set in execve() when the test user has not access to sys.executable.
… root home directory (pythonGH-114236) * pythongh-104522: Fix test_subprocess failure when build Python in the root home directory EPERM is raised when setreuid() fails. EACCES is set in execve() when the test user has not access to sys.executable.
EPERM is raised when setreuid() fails.
EACCES is set in execve() when the test user has not access to sys.executable.