[Python-checkins] bpo-37098: Skip memfd_create test before Linux 3.17 (GH-13677)

Christian Heimes webhook-mailer at python.org
Thu May 30 05:27:12 EDT 2019


https://github.com/python/cpython/commit/6eb814b8ce9a4fed8773a65501fb96aad8b3ecf2
commit: 6eb814b8ce9a4fed8773a65501fb96aad8b3ecf2
branch: master
author: Christian Heimes <christian at python.org>
committer: GitHub <noreply at github.com>
date: 2019-05-30T11:27:06+02:00
summary:

bpo-37098: Skip memfd_create test before Linux 3.17 (GH-13677)

files:
A Misc/NEWS.d/next/Tests/2019-05-30-10-57-39.bpo-37098.SfXt1M.rst
M Lib/test/test_os.py

diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 820c99c7a07c..f17a19a7585d 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -3123,6 +3123,7 @@ def test_stty_match(self):
 
 
 @unittest.skipUnless(hasattr(os, 'memfd_create'), 'requires os.memfd_create')
+ at support.requires_linux_version(3, 17)
 class MemfdCreateTests(unittest.TestCase):
     def test_memfd_create(self):
         fd = os.memfd_create("Hi", os.MFD_CLOEXEC)
diff --git a/Misc/NEWS.d/next/Tests/2019-05-30-10-57-39.bpo-37098.SfXt1M.rst b/Misc/NEWS.d/next/Tests/2019-05-30-10-57-39.bpo-37098.SfXt1M.rst
new file mode 100644
index 000000000000..84e06e71869f
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2019-05-30-10-57-39.bpo-37098.SfXt1M.rst
@@ -0,0 +1 @@
+Fix test_memfd_create on older Linux Kernels.



More information about the Python-checkins mailing list