]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-154218: Fix test_posix_fallocate on file systems that do not support posix_...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 20 Jul 2026 09:35:22 +0000 (11:35 +0200)
committerGitHub <noreply@github.com>
Mon, 20 Jul 2026 09:35:22 +0000 (12:35 +0300)
(cherry picked from commit 051b6e07f9e43980d99c563d67bea32144238461)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Lib/test/test_posix.py

index 31657bdc9d4476d41e90b1b0c9319c19da11da89..282418e27e5b572dfd0e4258c57464689804f25d 100644 (file)
@@ -415,8 +415,10 @@ class PosixTester(unittest.TestCase):
             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: