Skip to content

Commit 96fb828

Browse files
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 09c4a7d) Co-authored-by: Ned Deily <[email protected]>
1 parent e60f6e1 commit 96fb828

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Lib/test/test_posix.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,12 @@ def test_posix_fallocate(self):
343343
except OSError as inst:
344344
# issue10812, ZFS doesn't appear to support posix_fallocate,
345345
# so skip Solaris-based since they are likely to have ZFS.
346-
if inst.errno != errno.EINVAL or not sys.platform.startswith("sunos"):
346+
# issue33655: Also ignore EINVAL on *BSD since ZFS is also
347+
# often used there.
348+
if inst.errno == errno.EINVAL and sys.platform.startswith(
349+
('sunos', 'freebsd', 'netbsd', 'openbsd', 'gnukfreebsd')):
350+
raise unittest.SkipTest("test may fail on ZFS filesystems")
351+
else:
347352
raise
348353
finally:
349354
os.close(fd)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Ignore test_posix_fallocate failures on BSD platforms that might be due to
2+
running on ZFS.

0 commit comments

Comments
 (0)