bpo-38692: Skip test_posix.test_pidfd_open() on EPERM by vstinner · Pull Request #17290 · python/cpython (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation12 Commits1 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Skip test_posix.test_pidfd_open() test if os.pidfd_open() fails with
a PermissionError. It can happen in a Linux sandbox using a whitelist
of syscalls which doesn't allow pidfd_open syscall yet.
https://bugs.python.org/issue38692
This indeed workarounds the issue we have in Fedora. I will also try get pidfd_open whitelisted in systemd-nspawn, but that can take a while. In the meantime, this is IMHO the best we can get.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got another test failure during our weekly python 3.9 update on Arch Linux:
======================================================================
FAIL: test_pidfd_send_signal (test.test_signal.PidfdSignalTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/python-git/src/cpython/Lib/test/test_signal.py", line 1287, in test_pidfd_send_signal
self.assertEqual(cm.exception.errno, errno.EBADF)
AssertionError: 1 != 9
----------------------------------------------------------------------
Could that test be skipped in case of EPERM from the system call pidfd_send_signal
, too?
I got another test failure during our weekly python 3.9 update on Arch Linux: (...)
This PR fix it, no? You get a EPERM error (errno 1).
Could that test be skipped in case of EPERM from the system call pidfd_send_signal, too?
My PR skip pidfd_open() test if the syscall fails with EPERM. Python doesn't expose pidfd_send_signal() yet, so I don't understand your question.
Skip the test_posix.test_pidfd_open() test if os.pidfd_open() fails with a PermissionError. This situation can happen in a Linux sandbox using a syscall whitelist which doesn't allow the pidfd_open() syscall yet.
I got another test failure during our weekly python 3.9 update on Arch Linux: (...)
Would yo mind to describe your issue in https://bugs.python.org/issue38692 ? What is your kernel version? Are you running the Python test suite in any sandbox? If you are not using a sandbox, I'm surprised that you got a EPERM error.
I got another test failure during our weekly python 3.9 update on Arch Linux: (...)
Oh. Is it a similar issue than https://bugs.python.org/issue38692#msg356235 where you ran the Python test suite using systemd-nspawn sandbox?
yan12125 added a commit to archlinuxcn/repo that referenced this pull request
jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request
Skip the test_posix.test_pidfd_open() test if os.pidfd_open() fails with a PermissionError. This situation can happen in a Linux sandbox using a syscall whitelist which doesn't allow the pidfd_open() syscall yet (like systemd-nspawn).
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request
Skip the test_posix.test_pidfd_open() test if os.pidfd_open() fails with a PermissionError. This situation can happen in a Linux sandbox using a syscall whitelist which doesn't allow the pidfd_open() syscall yet (like systemd-nspawn).
dundee pushed a commit to dundee/pkgbuilds that referenced this pull request
dundee pushed a commit to dundee/pkgbuilds that referenced this pull request
Labels
Tests in the Lib/test dir