[Python-Dev] OS X buildbots: why am I skipping these tests?

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Wed Jun 30 21:10:05 CEST 2010


On 05:29 pm, martin at v.loewis.de wrote:
>Am 30.06.2010 13:32, schrieb exarkun at twistedmatrix.com:
>>On 05:24 am, martin at v.loewis.de wrote:
>>>>Seems to work fine.  So this I don't understand.  Any ideas, anyone?
>>>
>>>Didn't we discuss this before? The buildbot slave has no controlling
>>>terminal anymore, hence it cannot open /dev/tty. If you are curious,
>>>just patch your checkout to output the exact errno (e.g. to stdout),
>>>and trigger a build through the web.
>>
>>Could the test be rewritten (or supplemented) to use a pty?  Most or
>>perhaps all of the same operations should be supported.
>
>I'm not sure. It uses TIOCGPGRP, basically to establish that ioctl
>can also put results into a Python array (IIUC). This goes back to
>http://bugs.python.org/555817
>
>Somebody rewriting it would need to make sure the original test purpose
>is still met.

Absolutely.  And even so, it may still make sense to run the test 
against both /dev/tty and a pty (or whatever subset of those things can 
be acquired in the testing environment).

You can do a TIOCGPGRP on a new pty (created by os.openpty) but it 
produces somewhat less interesting results than doing it on /dev/tty. 
FIONREAD might be a nice alternative.  It produces interesting (ie, non- 
zero) values in an easily predictable/controllable way (it tells you how 
many bytes are in the read buffer).

Jean-Paul


More information about the Python-Dev mailing list