Skip to content

Commit 051b6e0

Browse files
gh-154218: Fix test_posix_fallocate on file systems that do not support posix_fallocate() (GH-154219)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 2875d1d commit 051b6e0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Lib/test/test_os/test_posix.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,10 @@ def test_posix_fallocate(self):
415415
if inst.errno == errno.EINVAL and sys.platform.startswith(
416416
('sunos', 'freebsd', 'openbsd', 'gnukfreebsd')):
417417
raise unittest.SkipTest("test may fail on ZFS filesystems")
418-
elif inst.errno == errno.EOPNOTSUPP and sys.platform.startswith("netbsd"):
419-
raise unittest.SkipTest("test may fail on FFS filesystems")
418+
elif inst.errno == errno.EOPNOTSUPP:
419+
# ZFS on FreeBSD, FFS on NetBSD, etc.
420+
raise unittest.SkipTest(
421+
"the file system does not support posix_fallocate()")
420422
else:
421423
raise
422424
finally:

0 commit comments

Comments
 (0)