[3.13] gh-154218: Fix test_posix_fallocate on file systems that do not support posix_fallocate() (GH-154219) (GH-154234)

serhiy-storchaka <[email protected]>
Newsgroups gmane.comp.python.cvs
Message-ID <[email protected]>
https://github.com/python/cpython/commit/f6a807e084911a286cc7fa77d0d469ee6fcec941
commit: f6a807e084911a286cc7fa77d0d469ee6fcec941
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-07-20T12:35:08+03:00
summary:

[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 051b6e07f9e43980d99c563d67bea32144238461)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>

files:
M Lib/test/test_posix.py

diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 085815f2c99baf..4fba921cbf7ad2 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -415,8 +415,10 @@ def test_posix_fallocate(self):
             if inst.errno == errno.EINVAL and sys.platform.startswith(
                 ('sunos', 'freebsd', 'openbsd', 'gnukfreebsd')):
                 raise unittest.SkipTest("test may fail on ZFS filesystems")
-            elif inst.errno == errno.EOPNOTSUPP and sys.platform.startswith("netbsd"):
-                raise unittest.SkipTest("test may fail on FFS filesystems")
+            elif inst.errno == errno.EOPNOTSUPP:
+                # ZFS on FreeBSD, FFS on NetBSD, etc.
+                raise unittest.SkipTest(
+                    "the file system does not support posix_fallocate()")
             else:
                 raise
         finally:

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.