git: f40ba42334e6 - main - lang/python314: avoid posix_fallocate test failure

From: Matthias Andree <mandree_at_FreeBSD.org>
Date: Sat, 01 Nov 2025 23:10:59 UTC
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f40ba42334e6448d96cb54c652e01d7e45190f9b

commit f40ba42334e6448d96cb54c652e01d7e45190f9b
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2025-11-01 22:12:42 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2025-11-01 22:14:18 +0000

    lang/python314: avoid posix_fallocate test failure
    
    that stems from our posix_fallocate() returning ENOTSUP
    in accordance with the Open Group Base Specifications Issue 8.
    
    Patch test to trap that return code on FreeBSD as well (it
    was handled for NetBSD already.)
---
 lang/python314/files/patch-Lib_test_test__posix.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/lang/python314/files/patch-Lib_test_test__posix.py b/lang/python314/files/patch-Lib_test_test__posix.py
new file mode 100644
index 000000000000..6dc5ab44b540
--- /dev/null
+++ b/lang/python314/files/patch-Lib_test_test__posix.py
@@ -0,0 +1,18 @@
+--- Lib/test/test_posix.py.orig	2025-11-01 21:42:35 UTC
++++ Lib/test/test_posix.py
+@@ -412,11 +412,12 @@ class PosixTester(unittest.TestCase):
+             # so skip Solaris-based since they are likely to have ZFS.
+             # issue33655: Also ignore EINVAL on *BSD since ZFS is also
+             # often used there.
+-            if inst.errno == errno.EINVAL and sys.platform.startswith(
++            if (inst.errno == errno.EINVAL or inst.errno == errno.ENODEV) 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")
++	    # FreeBSD may return EOPNOTSUPP in some versions
++            elif inst.errno == errno.EOPNOTSUPP and sys.platform.startswith(('netbsd', 'freebsd')):
++                raise unittest.SkipTest("test may fail on ZFS and FFS filesystems")
+             else:
+                 raise
+         finally: