Skip to content

Commit 29739c7

Browse files
miss-islingtonserhiy-storchakaclaude
authored
[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 1bf86c1) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 37a5c69 commit 29739c7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/test/test_os.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ def test_getcwd_long_path(self):
168168
# ("The filename or extension is too long")
169169
break
170170
except OSError as exc:
171-
if exc.errno == errno.ENAMETOOLONG:
171+
# DragonFly BSD raises EFAULT for a too long path.
172+
if exc.errno in (errno.ENAMETOOLONG, errno.EFAULT):
172173
break
173174
else:
174175
raise

0 commit comments

Comments
 (0)