test_posix, test_random failing
![](https://secure.gravatar.com/avatar/12362ecee4672f1dd2d641ce5b4eca14.jpg?s=120&d=mm&r=g)
My nightly cronjob has issued two warnings for the CVS checkout at 02:00 CET today: test test_posix failed -- Traceback (most recent call last): File "/home/lemburg/projects/Python/Dev-Python/Lib/test/test_posix.py", line 39, in testNoArgFunctions posix_func() OSError: [Errno 25] Inappropriate ioctl for device The traceback is not very helpful I'm afraid and when I run the test by hand I can't reproduce it. test test_random failed -- Traceback (most recent call last): File "/home/lemburg/projects/Python/Dev-Python/Lib/test/test_random.py", line 25, in test_autoseed self.assertNotEqual(state1, state2) File "/home/lemburg/projects/Python/Dev-Python/Lib/unittest.py", line 300, in failIfEqual raise self.failureException, \ AssertionError: (2, (1045703145, 318847470, 620640488, 320379787, -1732263717, -1278593374, ... Again, I can't reproduce this one either. Now, these failures may be due to some quirk in my machine or hint to an intermittent problem with the above code. Anybody else see these ? -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Feb 20 2003)
Python/Zope Products & Consulting ... http://www.egenix.com/ mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
Python UK 2003, Oxford: 40 days left EuroPython 2003, Charleroi, Belgium: 124 days left
![](https://secure.gravatar.com/avatar/047f2332cde3730f1ed661eebb0c5686.jpg?s=120&d=mm&r=g)
My nightly cronjob has issued two warnings for the CVS checkout at 02:00 CET today:
test test_posix failed -- Traceback (most recent call last): File "/home/lemburg/projects/Python/Dev-Python/Lib/test/test_posix.py", line 39, in testNoArgFunctions posix_func() OSError: [Errno 25] Inappropriate ioctl for device
The traceback is not very helpful I'm afraid and when I run the test by hand I can't reproduce it.
Try running the test from a cron job without regrtest (i.e. ./python Lib/test/test_posix.py), and putting some extra prints in it. Some of the functions tested (e.g. ctermid, getlogin) use stdin to determine who is logged in. Maybe these should just be ignored if they fail with this specific error (since the error means they're working as advertised).
test test_random failed -- Traceback (most recent call last): File "/home/lemburg/projects/Python/Dev-Python/Lib/test/test_random.py", line 25, in test_autoseed self.assertNotEqual(state1, state2) File "/home/lemburg/projects/Python/Dev-Python/Lib/unittest.py", line 300, in failIfEqual raise self.failureException, \ AssertionError: (2, (1045703145, 318847470, 620640488, 320379787, -1732263717, -1278593374, ...
This one I don't understand. Maybe the sleep(1) in the test isn't long enough? --Guido van Rossum (home page: http://www.python.org/~guido/)
![](https://secure.gravatar.com/avatar/12362ecee4672f1dd2d641ce5b4eca14.jpg?s=120&d=mm&r=g)
Guido van Rossum wrote:
My nightly cronjob has issued two warnings for the CVS checkout at 02:00 CET today:
test test_posix failed -- Traceback (most recent call last): File "/home/lemburg/projects/Python/Dev-Python/Lib/test/test_posix.py", line 39, in testNoArgFunctions posix_func() OSError: [Errno 25] Inappropriate ioctl for device
The traceback is not very helpful I'm afraid and when I run the test by hand I can't reproduce it.
Try running the test from a cron job without regrtest (i.e. ./python Lib/test/test_posix.py), and putting some extra prints in it.
Some of the functions tested (e.g. ctermid, getlogin) use stdin to determine who is logged in. Maybe these should just be ignored if they fail with this specific error (since the error means they're working as advertised).
Ok, here's the output: testNoArgFunctions (__main__.PosixTester) ... Running function ctermid Running function getcwd Running function getcwdu Running function uname Running function times Running function getlogin ERROR Running function getloadavg Running function tmpnam Running function getegid Running function geteuid Running function getgid Running function getgroups Running function getpid Running function getpgrp Running function getppid Running function getuid ok Looks like getlogin doesn't like being run in non-interactive mode (ie. without a terminal).
test test_random failed -- Traceback (most recent call last): File "/home/lemburg/projects/Python/Dev-Python/Lib/test/test_random.py", line 25, in test_autoseed self.assertNotEqual(state1, state2) File "/home/lemburg/projects/Python/Dev-Python/Lib/unittest.py", line 300, in failIfEqual raise self.failureException, \ AssertionError: (2, (1045703145, 318847470, 620640488, 320379787, -1732263717, -1278593374, ...
This one I don't understand. Maybe the sleep(1) in the test isn't long enough?
I could not reproduce this, but perhaps using long(time.time()*256) isn't safe enough to produce different states in the WH-generator ?! I'd add a counter or hash the previous stored state to add some more noise. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Feb 20 2003)
Python/Zope Products & Consulting ... http://www.egenix.com/ mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
Python UK 2003, Oxford: 40 days left EuroPython 2003, Charleroi, Belgium: 124 days left
![](https://secure.gravatar.com/avatar/047f2332cde3730f1ed661eebb0c5686.jpg?s=120&d=mm&r=g)
I suggesting making to SF tracker items for this now. --Guido van Rossum (home page: http://www.python.org/~guido/)
![](https://secure.gravatar.com/avatar/12362ecee4672f1dd2d641ce5b4eca14.jpg?s=120&d=mm&r=g)
Guido van Rossum wrote:
I suggesting making to SF tracker items for this now.
Done. -- Marc-Andre Lemburg eGenix.com Professional Python Software directly from the Source (#1, Feb 20 2003)
Python/Zope Products & Consulting ... http://www.egenix.com/ mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
Python UK 2003, Oxford: 40 days left EuroPython 2003, Charleroi, Belgium: 124 days left
participants (2)
-
Guido van Rossum
-
M.-A. Lemburg