From: Serhiy Storchaka Date: Mon, 20 Jul 2026 08:11:53 +0000 (+0300) Subject: gh-154218: Fix test_posix_fallocate on file systems that do not support posix_falloca... X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=051b6e07f9e43980d99c563d67bea32144238461;p=thirdparty%2FPython%2Fcpython.git gh-154218: Fix test_posix_fallocate on file systems that do not support posix_fallocate() (GH-154219) Co-authored-by: Claude Fable 5 --- diff --git a/Lib/test/test_os/test_posix.py b/Lib/test/test_os/test_posix.py index 8e83fa21dae6..79e234cbcd2a 100644 --- a/Lib/test/test_os/test_posix.py +++ b/Lib/test/test_os/test_posix.py @@ -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: