[issue7564] test_ioctl may fail when run in background

STINNER Victor report at bugs.python.org
Sat Jan 23 01:37:40 CET 2010


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

test_ioctl() gets the process group ID of the foreground process group on /dev/tty. If Python is in foreground, it's equal to the process group ID (os.getpgrp()) or to the session ID (os.getsid(0)). If Python is in background, yes, the test fail.

test_ioctl_mutate() contains test_ioctl() but also ensure that the input buffer is not modified by the ioctl.

If you would like to run test_ioctl.py in background, you will have to disable these 2 tests: ignore the tests if the process is in background. Detect if a process is in foreground or background is exactly the goal of test_ioctl()...

----------
nosy: +haypo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7564>
_______________________________________


More information about the Python-bugs-list mailing list