Author ned.deily
Recipients ned.deily
Date 2013-02-03.08:46:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1359881195.85.0.467111019736.issue17111@psf.upfronthosting.co.za>
In-reply-to
Content
Seen on "X86 Tiger 2.7" buildbot (http://buildbot.python.org/all/builders/x86%20Tiger%202.7)

test_surrogates (test.test_fileio.OtherFileTests) ... test test_fileio failed -- Traceback (most recent call last):
  File "/Users/db3l/buildarea/2.7.bolen-tiger/build/Lib/test/test_fileio.py", line 455, in test_surrogates
    self.fail('Bad output: %r' % out)
AssertionError: Bad output: 'Traceback (most recent call last):\n  File "<string>", line 1, in <module>\nIOError: [Errno 22] Invalid argument: \'\\xed\\xb2\\x80.txt\'\n[20282 refs]\n'

Looking into it a bit, the test attempts to open a file with a filename containing surrogates.  On OS X 10.4 (Tiger), an attempt to open such a file on a standard HFS+ file system appears to always fail with the above error 22 (EINVAL), rather than error 2 (ENOENT) "No such file or directory" as the test expects and as more recent versions of OS X do.  So the test should probably be changed to expect either error code.  I'm attaching a patch that should do that.

However, there is another issue.  The test does not always fail on 10.4 as one would expect.  The test on the buildbot sometimes succeeds.  On my own 10.4 system, while I predictably receive an EINVAL when attempting to open the file, running test_fileio in isolation seems to always pass and it's not obvious why it does.  The first part of the test, the local open fails as expected but, without the patch, the test of an open in a subprocess passes when it should be failing.  But I was able to reproduce the Error 22 failure, as seen on the buildbot failures, with the same interpreter build by using a --randseed value from one of the buildbot failures.  So there appears to be a test interaction problem here as well (environment variables?).

/python.exe -Wd -3 -E -tt  -R ./Lib/test/regrtest.py -uall -rwW --randseed=2535964
History
Date User Action Args
2013-02-03 08:46:35ned.deilysetrecipients: + ned.deily
2013-02-03 08:46:35ned.deilysetmessageid: <1359881195.85.0.467111019736.issue17111@psf.upfronthosting.co.za>
2013-02-03 08:46:35ned.deilylinkissue17111 messages
2013-02-03 08:46:35ned.deilycreate