Re: Re: [farm-report] Daily Snake Farm report
Guido van Rossum <[email protected]> Fri, 13 Sep 2002 17:19:54 -0400
| Newsgroups | gmane.comp.python.snake-farm.user |
|---|---|
| Message-ID | <[email protected]> |
> On Fri, Sep 13, 2002 at 10:11:05AM -0400, Guido van Rossum wrote: > > > I'm not ignoring this issue, but the files do get both stdout and > > > stderr redirected to them. > > > > Aha. The OOM kill must've thrown away the pending stdout buffer; > > makes sense. Try running the tests with "python -u". > > The kill in itself doesn't do this. Have a look at some of the failed > ia64 tests (eg > http://www.lysator.liu.se/xenofarm/python/files/97_13/testlog.txt; The > failed test is test_grp, so we're missing a lot of output). > > > > Rather, I think this may be a issue with how regrtest.py handles > > > stdout. > > > > Doubt it. While regrtest.py indeed redirects stdout of the test it > > runs, it prints the test name to the real stdout. > > But how come it disappears when I do "make test > file.log 2>&1"? If I > run the test in my terminal, I see all the text. If I redirect both > stdout and -err to file, I get what you see in the results. python -u > solves this problem, but seem to favour stderr, so lines can change > order. The program occasionally writes a line to the C stdout file. When stdout is directed to a file, the C stdio library uses an 8K buffer, which is flushed whenever it is full, whenever you call fflush(stdout), and when you call exit(). The buffered lines are lost when the program is killed or calls _exit(). That's all there is to this, I believe. > > Mmm, do you want me to add a flush() call to regrtest.py? That would > > be easy and effective and not require you to use python -u. > > That might be a good idea. OK. --Guido van Rossum (home page: http://www.python.org/~guido/)