-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix crash when passing a very long cmdline argument #11404
Conversation
@@ -262,3 +262,27 @@ def test(fix): | |||
"* 1 passed in *", | |||
] | |||
) | |||
|
|||
|
|||
def test_very_long_cmdline_arg(pytester: Pytester) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iandonnelly I'm having trouble reproducing the original problem, this test is passing on all platforms.
Any hints?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its possibly related to available file-systems/path types (i believe the github runners always use unc/long paths)
would it break when using a path thats not supported on all platforms (i believe >64k)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm thanks for the hint, trying now with a very large path (>100k), let's see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw anybody on linux can test this please?
>>> import errno
>>> errno.ENAMETOOLONG
38
The above is on Windows; on the original report, the errno was 36
on Linux, want to confirm that's ENAMETOOLONG
is indeed 36
.
EDIT: nevermind, just confirmed it is indeed 36
on Linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm no good using >100k
filenames, the test still passes.
I guess we can rely on patching then to ensure the behavior...
2fb06f2
to
6536514
Compare
Ready for review -- any suggestions on how to improve the approach taken here are appreciated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one is a special kind of icky 😮💨
Fixes pytest-dev#11394 (cherry picked from commit 28ccf47)
[7.4.x] Fix crash when passing a very long cmdline argument (#11404)
Fixes #11394