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_posix fails when run in non-interactive mode
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: lemburg, nnorwitz
Priority: normal Keywords:

Created on 2003-02-20 15:06 by lemburg, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Messages (2)
msg14695 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2003-02-20 15:06
>> 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).

msg14696 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-02-23 22:21
Logged In: YES 
user_id=33168

I changed the test to not try os.getlogin() if sys.stdin is
a tty.

Checked in as:
 * Lib/test/test_posix.py 1.4
History
Date User Action Args
2022-04-10 16:06:56adminsetgithub: 38013
2003-02-20 15:06:31lemburgcreate