]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-154218: Fix test_posix_fallocate on file systems that do not support posix_falloca...
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 20 Jul 2026 08:11:53 +0000 (11:11 +0300)
committerGitHub <noreply@github.com>
Mon, 20 Jul 2026 08:11:53 +0000 (08:11 +0000)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Lib/test/test_os/test_posix.py

index 8e83fa21dae6e227f8fede62890d9b32baa284ed..79e234cbcd2ae258b1f58d3fdae752586d36fa52 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: