-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Ignore load averages if getloadavg is unavailable #99242
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
Comments
You appear to be running the tests in a chroot environment? Is the proc filesystem mounted in that environment? os.getloadavg() is a thin wrapper around getloadavg(3), which with glibc on linux loads information from a file in /proc. |
@alittlesir, could you please answer my question? Given the implementation of os.getloadavg() I'm pretty sure this is not a bug in CPython, but in the setup of the environment where you run the tests (e.g. not having /proc mounted there). |
Agreed, there's no real bug here. However, we could just swallow the cpython/Lib/test/libregrtest/main.py Lines 722 to 723 in 8555dee
|
yes, you are right, it is not a bug in CPython, because it is only happened in the chroot environment, i am sorry to waste your time |
Agreed, the function is optional and we might as well ignore errors when calling it. Reporting the load average during test runs is not the most important part of running those tests. |
I rebranded this as an enhancement. |
…ditions. (GH-121663) Co-Authored-By: Kevin Diem <kg.diem@gmail.com>
…in conditions. (pythonGH-121663) (cherry picked from commit 0759cec) Co-authored-by: Bas Bloemsaat <bas@bloemsaat.com> Co-Authored-By: Kevin Diem <kg.diem@gmail.com>
…in conditions. (pythonGH-121663) (cherry picked from commit 0759cec) Co-authored-by: Bas Bloemsaat <bas@bloemsaat.com> Co-Authored-By: Kevin Diem <kg.diem@gmail.com>
…in conditions. (pythonGH-121663) Co-Authored-By: Kevin Diem <kg.diem@gmail.com>
It's a enhancement of the tests :) Merged and backported. Thank you for the fix! |
Uh oh!
There was an error while loading. Please reload this page.
when i run
chroot compile /home/abuild/rpmbuild/BUILD/Python-3.9.9/build/debug/python -m test.regrtest test_mailbox -wW
output:
os:openeuler22.03
Linked PRs
The text was updated successfully, but these errors were encountered: