[Python-checkins] bpo-33655: Also ignore test_posix_fallocate failures on BSD platforms (GH-7134)

Miss Islington (bot) webhook-mailer at python.org
Sat May 26 17:57:04 EDT 2018


https://github.com/python/cpython/commit/96fb828da305b18336b8d74b14f479c4f286cf7b
commit: 96fb828da305b18336b8d74b14f479c4f286cf7b
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-05-26T14:57:01-07:00
summary:

bpo-33655: Also ignore test_posix_fallocate failures on BSD platforms (GH-7134)


The failure may be due to the use oF ZFS, a case we already ignore
for Solaris-based systems where ZFS is frequently used.
(cherry picked from commit 09c4a7dee2eb39b515e5f499f184257cdbe9cb42)

Co-authored-by: Ned Deily <nad at python.org>

files:
A Misc/NEWS.d/next/Tests/2018-05-26-16-01-40.bpo-33655.Frb4LA.rst
M Lib/test/test_posix.py

diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index bf7c8c2119fb..7dea1beab2c2 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -343,7 +343,12 @@ def test_posix_fallocate(self):
         except OSError as inst:
             # issue10812, ZFS doesn't appear to support posix_fallocate,
             # so skip Solaris-based since they are likely to have ZFS.
-            if inst.errno != errno.EINVAL or not sys.platform.startswith("sunos"):
+            # issue33655: Also ignore EINVAL on *BSD since ZFS is also
+            # often used there.
+            if inst.errno == errno.EINVAL and sys.platform.startswith(
+                ('sunos', 'freebsd', 'netbsd', 'openbsd', 'gnukfreebsd')):
+                raise unittest.SkipTest("test may fail on ZFS filesystems")
+            else:
                 raise
         finally:
             os.close(fd)
diff --git a/Misc/NEWS.d/next/Tests/2018-05-26-16-01-40.bpo-33655.Frb4LA.rst b/Misc/NEWS.d/next/Tests/2018-05-26-16-01-40.bpo-33655.Frb4LA.rst
new file mode 100644
index 000000000000..7ed2ea232371
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2018-05-26-16-01-40.bpo-33655.Frb4LA.rst
@@ -0,0 +1,2 @@
+Ignore test_posix_fallocate failures on BSD platforms that might be due to
+running on ZFS.



More information about the Python-checkins mailing list