Skip to content

Commit f6a807e

Browse files
miss-islingtonserhiy-storchakaclaude
authored
[3.13] gh-154218: Fix test_posix_fallocate on file systems that do not support posix_fallocate() (GH-154219) (GH-154234)
(cherry picked from commit 051b6e0) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent e23e510 commit f6a807e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Lib/test/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)