Skip to content

Commit 91195cb

Browse files
committed
gh-148841: unified to one case for fallocate() failures on *BSD
1 parent 54a7e77 commit 91195cb

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

Lib/test/test_os/test_posix.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,10 @@ def test_posix_fallocate(self):
412412
# so skip Solaris-based since they are likely to have ZFS.
413413
# issue33655: Also ignore EINVAL on *BSD since ZFS is also
414414
# often used there.
415-
if inst.errno == errno.EINVAL and sys.platform.startswith(
416-
('sunos', 'freebsd', 'openbsd', 'gnukfreebsd')):
417-
raise unittest.SkipTest("test may fail on ZFS filesystems")
418-
elif inst.errno == errno.EOPNOTSUPP and sys.platform.startswith(
419-
("netbsd", "freebsd")):
420-
raise unittest.SkipTest("test may fail on FFS filesystems")
415+
# gh-148841: unified to one case for EINVAL/EOPNOTSUPP on *BSD
416+
if inst.errno in (errno.EINVAL, errno.EOPNOTSUPP) and sys.platform.startswith(
417+
('sunos', 'freebsd', 'openbsd', 'netbsd', 'gnukfreebsd')):
418+
raise unittest.SkipTest("test may fail on ZFS / FFS filesystems")
421419
else:
422420
raise
423421
finally:

0 commit comments

Comments
 (0)