https://github.com/python/cpython/commit/29739c790e55d97526400bbd8f0cea93bbd11034 commit: 29739c790e55d97526400bbd8f0cea93bbd11034 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2026-07-24T11:43:07Z summary:
[3.14] gh-154437: Fix test_getcwd_long_path on DragonFly BSD (GH-154438) (GH-154455) DragonFly BSD raises EFAULT instead of ENAMETOOLONG when the path exceeds PATH_MAX. (cherry picked from commit 1bf86c134a5260876ad31fb32b832cbea24c21ad) Co-authored-by: Serhiy Storchaka <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]> files: M Lib/test/test_os.py diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 3942877215f53e..8c41d9799b5fa9 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -168,7 +168,8 @@ def test_getcwd_long_path(self): # ("The filename or extension is too long") break except OSError as exc: - if exc.errno == errno.ENAMETOOLONG: + # DragonFly BSD raises EFAULT for a too long path. + if exc.errno in (errno.ENAMETOOLONG, errno.EFAULT): break else: raise _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
