]> granicus.if.org Git - python/commitdiff
bpo-33655: Also ignore test_posix_fallocate failures on BSD platforms (GH-7134)
authorNed Deily <nad@python.org>
Sat, 26 May 2018 20:30:46 +0000 (16:30 -0400)
committerGitHub <noreply@github.com>
Sat, 26 May 2018 20:30:46 +0000 (16:30 -0400)
The failure may be due to the use oF ZFS, a case we already ignore
for Solaris-based systems where ZFS is frequently used.

Lib/test/test_posix.py
Misc/NEWS.d/next/Tests/2018-05-26-16-01-40.bpo-33655.Frb4LA.rst [new file with mode: 0644]

index ecf3e93eb0482ff27030ecc9d09d009bff538e25..e54484ce7da2c64c4045a2d3dec53af2ba504149 100644 (file)
@@ -343,7 +343,12 @@ class PosixTester(unittest.TestCase):
         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 (file)
index 0000000..7ed2ea2
--- /dev/null
@@ -0,0 +1,2 @@
+Ignore test_posix_fallocate failures on BSD platforms that might be due to
+running on ZFS.