[Python-checkins] bpo-39157: Skip test_pidfd_send_signal if the system does not have enough privileges to use pidfd (GH-17740)

Pablo Galindo webhook-mailer at python.org
Sun Dec 29 16:36:03 EST 2019


https://github.com/python/cpython/commit/8f0703ff92ed2d9ccd52d7e083c7bc26e732a428
commit: 8f0703ff92ed2d9ccd52d7e083c7bc26e732a428
branch: master
author: Pablo Galindo <Pablogsal at gmail.com>
committer: GitHub <noreply at github.com>
date: 2019年12月29日T21:35:54Z
summary:
bpo-39157: Skip test_pidfd_send_signal if the system does not have enough privileges to use pidfd (GH-17740)
files:
M Lib/test/test_signal.py
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
index 5c02c28a90e17..5b072b0c60ee3 100644
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -1284,6 +1284,8 @@ def test_pidfd_send_signal(self):
 signal.pidfd_send_signal(0, signal.SIGINT)
 if cm.exception.errno == errno.ENOSYS:
 self.skipTest("kernel does not support pidfds")
+ elif cm.exception.errno == errno.EPERM:
+ self.skipTest("Not enough privileges to use pidfs")
 self.assertEqual(cm.exception.errno, errno.EBADF)
 my_pidfd = os.open(f'/proc/{os.getpid()}', os.O_DIRECTORY)
 self.addCleanup(os.close, my_pidfd)


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /