This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_resource fails on recent linux systems
Type: behavior Stage:
Components: Interpreter Core Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: akuchling, doko, gvanrossum, ncoghlan, nnorwitz, orsenthil, python-dev
Priority: high Keywords: easy

Created on 2007-10-18 09:13 by doko, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tst.c doko, 2007-10-18 09:13
Messages (9)
msg56520 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2007-10-18 09:13
The test_resource test fails at least on all non x86 linux systems; the
test case notes:

# Now check to see what happens when the RLIMIT_FSIZE is small.  Some
# versions of Python were terminated by an uncaught SIGXFSZ, but
# pythonrun.c has been fixed to ignore that exception.  If so, the
# write() should return EFBIG when the limit is exceeded.

however instead of EFBIG errno is set to ESPIPE, causing an IOException.
and letting the test fail.
msg56521 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2007-10-18 09:15
$ python Lib/test/test_resource.py
True
Traceback (most recent call last):
  File "Lib/test/test_resource.py", line 42, in <module>
    f.close()
IOError: [Errno 27] File too large
msg56528 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-10-18 16:54
Patch please?
msg57196 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2007-11-07 12:25
I just hit this as well when rerunning the 2.5 tests before checking
something else in. The test itself appears to be fine, but the call to
f.close() outside the try/except block attempting to flush the file to
disk and raising an IOError.

Didn't something like this get fixed recently? Did the new IO module in
py3k have a similar problem?

(assigning to Neal to make a call on the importance for 2.5.2)
msg57198 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2007-11-07 12:42
I just compared the 2.5 test_resource with the trunk test_resource - the
latter has been modified to remove the file size limitation before it
attempts to close the file, eliminating the test failure without
changing the underlying behaviour of f.close.
msg57212 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-11-07 17:52
It's fine to fix this in 2.5.2, as it is just a test.  (IMO you can just
copy the 2.6 test_resource.py into 2.5.2, assuming that works.)
msg62812 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2008-02-23 21:37
I went ahead and pulled the 2.6 test back into 2.5-maint in
rev. 61016, and then realized that Nick actually backported the
change in rev. 60727.  I decided to leave it alone; the 2.6
test should still avoid the problem, has the additional 
feature of using unittest, and isn't a feature change to the interpreter
itself.
msg184230 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-03-15 14:50
New changeset 59292f366b53 by Senthil Kumaran in branch 'default':
#1291 http.server's send_error takes an optional explain argument
http://hg.python.org/cpython/rev/59292f366b53
msg184454 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2013-03-18 14:18
The last commit 59292f366b53  was for fixing issue12921 and not this. Wrongly linked.
History
Date User Action Args
2022-04-11 14:56:27adminsetgithub: 45632
2013-03-18 14:18:23orsenthilsetnosy: + orsenthil
messages: + msg184454
2013-03-15 14:50:26python-devsetnosy: + python-dev
messages: + msg184230
2008-02-23 21:37:15akuchlingsetstatus: open -> closed
nosy: + akuchling
messages: + msg62812
title: test_resource fails on recent linux systems ( -> test_resource fails on recent linux systems
2008-02-23 21:13:26akuchlingsetkeywords: + easy
2007-11-07 17:52:33gvanrossumsetmessages: + msg57212
2007-11-07 12:42:17ncoghlansetmessages: + msg57198
2007-11-07 12:25:03ncoghlansetnosy: + nnorwitz, ncoghlan
messages: + msg57196
priority: high
assignee: nnorwitz
components: + Interpreter Core, - Extension Modules
resolution: accepted
2007-10-18 16:54:16gvanrossumsetnosy: + gvanrossum
messages: + msg56528
2007-10-18 09:15:03dokosetmessages: + msg56521
2007-10-18 09:13:42dokocreate