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_os failing with errno 61: No Data Available
Type: crash Stage: resolved
Components: Tests Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: beardedp, benjamin.peterson, python-dev, rosslagerwall
Priority: normal Keywords: patch

Created on 2012-03-18 07:16 by beardedp, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_os_support_ext.patch beardedp, 2012-03-18 07:16 review
test_os_support_ext_return_false.patch beardedp, 2012-03-19 01:38 review
Messages (4)
msg156232 - (view) Author: Ben Hayden (beardedp) * Date: 2012-03-18 07:16
When running the test suite on Linux 3.2.9-1, I get the following error on the test_os suite:

test test_os crashed -- Traceback (most recent call last):
  File "/home/benhayden/Documents/cpython/Lib/test/regrtest.py", line 1229, in runtest_inner
    the_package = __import__(abstest, globals(), locals(), [])
  File "/home/benhayden/Documents/cpython/Lib/test/test_os.py", line 1767, in <module>
    @unittest.skipUnless(supports_extended_attributes(),
  File "/home/benhayden/Documents/cpython/Lib/test/test_os.py", line 1754, in supports_extended_attributes
    os.fsetxattr(fp.fileno(), b"user.test", b"")
OSError: [Errno 61] No data available

I don't know the best way to handle this error, but instead of raising it, I just let the decorator return False. This allowed test_os to finish (and finish successfully) on my machine.

Once again, I don't really know what ENODATA might mean, so I just tried the first thing that worked for me.
msg156233 - (view) Author: Ross Lagerwall (rosslagerwall) (Python committer) Date: 2012-03-18 07:28
Perhaps any errors that occur during supports_extended_attributes should cause it to just return false?
msg156303 - (view) Author: Ben Hayden (beardedp) * Date: 2012-03-19 01:36
That was my thought, but again, I didn't really know if it was 'safe' to snuff the OSError all together. This patch just returns False if any OSError is raised.
msg156307 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-19 02:26
New changeset ada766b07686 by Benjamin Peterson in branch 'default':
all OSErrors should indicate there are no extended attributes (closes #14358)
http://hg.python.org/cpython/rev/ada766b07686
History
Date User Action Args
2022-04-11 14:57:28adminsetgithub: 58566
2012-03-19 02:26:16python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg156307

resolution: fixed
stage: resolved
2012-03-19 01:38:18beardedpsetfiles: + test_os_support_ext_return_false.patch
2012-03-19 01:36:31beardedpsetmessages: + msg156303
2012-03-18 07:28:44rosslagerwallsetnosy: + benjamin.peterson, rosslagerwall
messages: + msg156233
2012-03-18 07:16:51beardedpcreate