-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
posix.sched_{get|set}affinity(-1) no longer returns ProcessLookup causing test failures on FreeBSD #91361
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
Two test cases have been failing on FreeBSD buildbot for a while. Let's skip the error check on FreeBSD for now. 0:27:24 load avg: 1.97 Re-running test_posix in verbose mode (matching: test_sched_getaffinity, test_sched_setaffinity) Traceback (most recent call last):
File "/usr/home/buildbot/python/pull_request.koobs-freebsd-564d/build/Lib/test/test_posix.py", line 1197, in test_sched_getaffinity
self.assertRaises(OSError, posix.sched_getaffinity, -1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: OSError not raised by sched_getaffinity ====================================================================== Traceback (most recent call last):
File "/usr/home/buildbot/python/pull_request.koobs-freebsd-564d/build/Lib/test/test_posix.py", line 1215, in test_sched_setaffinity
self.assertRaises(OSError, posix.sched_setaffinity, -1, mask)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: OSError not raised by sched_setaffinity Ran 2 tests in 0.015s |
Koobs, please take a look. |
Koob's build bot is a FreeBSD 14 host. FreeBSD 14 is under development and has not reached stable yet. I bet that the issue was caused by a recent system and Kernel upgrade. |
Investigating |
From one of our base/kernel developers: --------------------------------------------------------------
So this is the difference: Python 3.11.0a6+ (heads/main:38ae5b8c0c, Apr 5 2022, 03:27:23) [GCC 11.2.0] on freebsd13
Type "help", "copyright", "credits" or "license" for more information.
>>> import posix
>>> mask = posix.sched_getaffinity(-1)
>>> mask
{0, 1, 2, 3, 4, 5, 6, 7}
Python 3.10.4 (main, Mar 25 2022, 00:00:00) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import posix
>>> mask = posix.sched_getaffinity(-1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ProcessLookupError: [Errno 3] No such process FreeBSD always accepted -1 as denoting the current process, while Linux For FreeBSD, both -1 and 0 works as getpid(), and I do not see it right -------------------------------------------------------------- I am not sure what changed between 3.10 and main that changed/removed |
So the current test is correct, 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: