https://github.com/python/cpython/commit/1bf86c134a5260876ad31fb32b832cbea24c21ad commit: 1bf86c134a5260876ad31fb32b832cbea24c21ad branch: main author: Serhiy Storchaka <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2026-07-22T12:05:06+03:00 summary:
gh-154437: Fix test_getcwd_long_path on DragonFly BSD (GH-154438) DragonFly BSD raises EFAULT instead of ENAMETOOLONG when the path exceeds PATH_MAX. Co-authored-by: Claude Opus 4.8 <[email protected]> files: M Lib/test/test_os/test_os.py diff --git a/Lib/test/test_os/test_os.py b/Lib/test/test_os/test_os.py index c62bceb25cabe0..3e5ad52c4ab130 100644 --- a/Lib/test/test_os/test_os.py +++ b/Lib/test/test_os/test_os.py @@ -156,7 +156,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]
