[Python-Dev] Test failures when running as root (original) (raw)

Chris Angelico rosuav at gmail.com
Tue Jan 14 01:48:46 CET 2014


And now for something completely different.

My root buildbot is finally now able to telnet out and get "Connection refused" errors. (For the curious, the VirtualBox "NAT" mode doesn't work properly, but the new "NAT Network" mode does. Why? I have no idea. But if anyone else is having the same problem, upgrade to the latest VirtualBox and set up a NAT Network. All I care is, it now works.) The test suite is now failing at another point, and this applies to 2.7, 3.3, and 3.x.

====================================================================== ERROR: test_initgroups (test.test_posix.PosixGroupsTester)

Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_posix.py", line 1143, in test_initgroups g = max(self.saved_groups) + 1 ValueError: max() arg is an empty sequence


The saved_groups value comes from posix.getgroups(), and it's being used to try to get a group that this user doesn't have (I think). When I run Python as root, posix.getgroups() returns [0], but apparently it's not returning any groups when the test runs.

So, two questions. Firstly, is this a problem that needs to be fixed in Python, or is it a configuration change that I made? It began failing recently, so possibly when I rebooted the VM as part of VirtualBox changes I mucked something up.

And secondly, how can I run the tests manually? I can't find a binary inside the buildarea tree. Does it get deleted afterward?

Apologies if these are dumb questions, hopefully they're a small distraction from PEP 460 arguments!

ChrisA



More information about the Python-Dev mailing list