[Python-Dev] test_posix, test_random failing

Guido van Rossum guido@python.org
Thu, 20 Feb 2003 08:03:40 -0500


> 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/)