]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-123823: Fix test_posix for unsupported posix_fallocate on NetBSD (GH-123824...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 9 Sep 2024 12:47:05 +0000 (14:47 +0200)
committerGitHub <noreply@github.com>
Mon, 9 Sep 2024 12:47:05 +0000 (12:47 +0000)
gh-123823: Fix test_posix for unsupported posix_fallocate on NetBSD (GH-123824)

Fix test_posix for unsupported posix_fallocate on NetBSD.
(cherry picked from commit df4f0cbfad8a1ed0146cabd30d01efd135d4d048)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Lib/test/test_posix.py

index 7ed45acf28cbd5d1bc5d1590bd08a1b64af33512..aa811326e4ccf0f843b5b75219ea7c81e587e6ed 100644 (file)
@@ -411,8 +411,10 @@ class PosixTester(unittest.TestCase):
             # issue33655: Also ignore EINVAL on *BSD since ZFS is also
             # often used there.
             if inst.errno == errno.EINVAL and sys.platform.startswith(
-                ('sunos', 'freebsd', 'netbsd', 'openbsd', 'gnukfreebsd')):
+                ('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")
             else:
                 raise
         finally: