Skip to content

Commit ae27dee

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 717204f commit ae27dee

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
@@ -230,7 +230,12 @@ def test_posix_fallocate(self):
230230
except OSError as inst:
231231
# issue10812, ZFS doesn't appear to support posix_fallocate,
232232
# so skip Solaris-based since they are likely to have ZFS.
233-
if inst.errno != errno.EINVAL or not sys.platform.startswith("sunos"):
233+
# issue33655: Also ignore EINVAL on *BSD since ZFS is also
234+
# often used there.
235+
if inst.errno == errno.EINVAL and sys.platform.startswith(
236+
('sunos', 'freebsd', 'netbsd', 'openbsd', 'gnukfreebsd')):
237+
raise unittest.SkipTest("test may fail on ZFS filesystems")
238+
else:
234239
raise
235240
finally:
236241
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)