-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-115596: Fix ProgramPriorityTests
in test_os
permanently changing the process priority
#115610
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
gh-115596: Fix ProgramPriorityTests
in test_os
permanently changing the process priority
#115610
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the test fails, we only see something like:
subprocess.CalledProcessError: Command '['/home/serhiy/py/cpython/python', '-c', 'if 1:\n import os\n os.setpriority(os.PRIO_PROCESS, os.getpid(), 0 + 1)\n print(os.getpriority(os.PRIO_PROCESS, os.getpid()))\n ']' returned non-zero exit status 1.
Which does not give any information about the cause of the failure. You can use assert_python_ok()
which shows the stdout and the stderr of the failed process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Pure test PRs usually do not need a NEWS entry, but this bug potentially had a large scope.
Thanks @brianschubert for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…ging the process priority (pythonGH-115610) (cherry picked from commit 90dd653) Co-authored-by: Brian Schubert <[email protected]>
GH-115616 is a backport of this pull request to the 3.12 branch. |
…ging the process priority (pythonGH-115610) (cherry picked from commit 90dd653) Co-authored-by: Brian Schubert <[email protected]>
GH-115617 is a backport of this pull request to the 3.11 branch. |
…nging the process priority (GH-115610) (GH-115616) (cherry picked from commit 90dd653) Co-authored-by: Brian Schubert <[email protected]>
…nging the process priority (GH-115610) (GH-115617) (cherry picked from commit 90dd653) Co-authored-by: Brian Schubert <[email protected]>
…ging the process priority (pythonGH-115610)
…ging the process priority (pythonGH-115610)
…ging the process priority (pythonGH-115610)
Fixes #115596
Runs the priority setting logic from
ProgramPriorityTests.test_set_get_priority
in a subprocess to prevent the priority change from taking permanent effect.