[issue15463] test_faulthandler can fail if install path is too long

2012-08-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: > Yes, I saw your patch, but I don't want to create very long filename. Not all platforms support paths longer than 500 characters. I think you may have a slight misunderstanding. My patch was not meant to test paths over 500 characters. It tests a path *unde

[issue15463] test_faulthandler can fail if install path is too long

2012-08-01 Thread STINNER Victor
STINNER Victor added the comment: > Victor, did you see and review my patch? There is currently no test to check > that a long file path (longer than 100 characters) will render, which was the > original issue that was fixed. The patch provides such a test. Yes, I saw your patch, but I don't

[issue15463] test_faulthandler can fail if install path is too long

2012-08-01 Thread Chris Jerdonek
Chris Jerdonek added the comment: > I didn't want to write such test, but I can review a patch adding such test. Victor, did you see and review my patch? There is currently no test to check that a long file path (longer than 100 characters) will render, which was the original issue that was f

[issue15463] test_faulthandler can fail if install path is too long

2012-08-01 Thread STINNER Victor
STINNER Victor added the comment: I added a test checking that faulthandler truncates strings to MAX_STRING_LENGTH characters using a very long function name. I consider this issue as done. -- resolution: -> fixed status: open -> closed ___ Python

[issue15463] test_faulthandler can fail if install path is too long

2012-08-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6e03f9b72c61 by Victor Stinner in branch 'default': Issue #15463: Write a test for faulthandler truncating the name of functions http://hg.python.org/cpython/rev/6e03f9b72c61 -- ___ Python tracker

[issue15463] test_faulthandler can fail if install path is too long

2012-07-30 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue15463] test_faulthandler can fail if install path is too long

2012-07-30 Thread Chris Jerdonek
Chris Jerdonek added the comment: Is it okay for me to reopen this issue to review the patch to add a test case for file paths longer than 100 characters, or should I create a new issue for that? -- ___ Python tracker

[issue15463] test_faulthandler can fail if install path is too long

2012-07-30 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching patch with test case for long script path. This test failed on my system before the fix and passes after. -- Added file: http://bugs.python.org/file26601/issue-15463-2.patch ___ Python tracker

[issue15463] test_faulthandler can fail if install path is too long

2012-07-30 Thread Chris Jerdonek
Chris Jerdonek added the comment: > I didn't want to write such test, but I can review a patch adding such test. Thank you. I will provide a patch for your review. I think a test for the path may be better as that was the original issue experienced. -- __

[issue15463] test_faulthandler can fail if install path is too long

2012-07-30 Thread Ned Deily
Ned Deily added the comment: BTW, the applied patch does fix the problem originally reported. Thanks. -- ___ Python tracker ___ ___ Py

[issue15463] test_faulthandler can fail if install path is too long

2012-07-30 Thread STINNER Victor
STINNER Victor added the comment: > I provided a patch to show how this can easily be done. Your patch does not create a path longer than 100 characters. I didn't want to write such test, but I can review a patch adding such test. The limit is not only applied on the filename, but also on the

[issue15463] test_faulthandler can fail if install path is too long

2012-07-30 Thread Chris Jerdonek
Chris Jerdonek added the comment: Shouldn't a test be added to check that the issue has been fixed though (i.e. a test with a path longer than the original 100 characters)? I provided a patch to show how this can easily be done. I would be happy to write the test. --

[issue15463] test_faulthandler can fail if install path is too long

2012-07-30 Thread STINNER Victor
STINNER Victor added the comment: > Issue #15463: the faulthandler module truncates strings to 500 characters, It should be able for most setup. See the issue #15479 if you consider that something better should be implemented. Long path names are handled differently on each platform, I don't w

[issue15463] test_faulthandler can fail if install path is too long

2012-07-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset ff7fc6a91212 by Victor Stinner in branch 'default': Issue #15463: the faulthandler module truncates strings to 500 characters, http://hg.python.org/cpython/rev/ff7fc6a91212 -- nosy: +python-dev ___ Python

[issue15463] test_faulthandler can fail if install path is too long

2012-07-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here is a patch to the tests that allows the tests to pass when the install path is long while still checking that file names show up correctly in the traceback. One advantage of this patch's approach is that it provides a way to test the rendering of long pa

[issue15463] test_faulthandler can fail if install path is too long

2012-07-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: > The purpose of the test is to check that the traceback is correct: > it's important to check that the filename ends with "threading.py". I agree with you. That is why I argued against including "or '...'" logic in the current test. > Changing the MAX_STRING

[issue15463] test_faulthandler can fail if install path is too long

2012-07-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: > There is no such issue. You can create it: add me to the nosy list. I created issue 15479 to allow the limits to be changed at runtime. -- ___ Python tracker ___

[issue15463] test_faulthandler can fail if install path is too long

2012-07-28 Thread STINNER Victor
STINNER Victor added the comment: > Regardless of whether MAX_STRING_LENGTH is increased, my instinct is that the > test should work for long install paths independent of the setting's value. > I wonder if there is a way to adjust the test so that the file name can still > be checked in such

[issue15463] test_faulthandler can fail if install path is too long

2012-07-28 Thread STINNER Victor
STINNER Victor added the comment: >> We may also add a function to change these limits at runtime. > > This sounds like a good idea. Is there already an issue for this? If not, I > could create one. There is no such issue. You can create it: add me to the nosy list. --

[issue15463] test_faulthandler can fail if install path is too long

2012-07-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: > We may also add a function to change these limits at runtime. This sounds like a good idea. Is there already an issue for this? If not, I could create one. Regardless of whether MAX_STRING_LENGTH is increased, my instinct is that the test should work for

[issue15463] test_faulthandler can fail if install path is too long

2012-07-27 Thread STINNER Victor
STINNER Victor added the comment: faulthandler has arbitrary limits to avoid an unlimited loop if some data are corrupted. #define MAX_STRING_LENGTH 100 #define MAX_FRAME_DEPTH 100 #define MAX_NTHREADS 100 The string limit is maybe too short. MAX_STRING_LENGTH can be set to 500 characters, wha

[issue15463] test_faulthandler can fail if install path is too long

2012-07-26 Thread Ned Deily
Ned Deily added the comment: Without investigating further, my instinct would be to prefer to truncate in the middle, if possible, otherwise truncate the head of the path, rather than truncate the tail. -- ___ Python tracker

[issue15463] test_faulthandler can fail if install path is too long

2012-07-26 Thread Chris Jerdonek
Chris Jerdonek added the comment: This might be obvious to some people, but for background purposes, this seems to be where the file name gets truncated (in the dump_frame() function): write(fd, "\"", 1); dump_ascii(fd, code->co_filename); write(fd, "\"", 1); http://hg.python.org/

[issue15463] test_faulthandler can fail if install path is too long

2012-07-26 Thread Ned Deily
New submission from Ned Deily : == FAIL: test_dump_traceback_threads (test.test_faulthandler.FaultHandlerTests) -- Traceback (most recent call last): File "/p