[Python-Dev] Test failures when running as root
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 ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Test failures when running as root
On 1/13/2014 7:48 PM, Chris Angelico wrote: 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 try: g = max(self.saved_groups) + 1 except ValueError: g = 1 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. Unless someone says that it is a bug for posix.getgroups to return an empty list, I would say that the test should be fixed by trying the code above. 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? If you build and keep a binary, it is easy. For example: path-to-binary -m test text_posix See doc chapter for test package and for 2.7 difference. I can't find a binary inside the buildarea tree. Does it get deleted afterward? No experience with bbots. Apologies if these are dumb questions, hopefully they're a small distraction from PEP 460 arguments! And welcomed. -- Terry Jan Reedy ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Test failures when running as root
On Mon, Jan 13, 2014 at 6:48 PM, Chris Angelico ros...@gmail.com wrote: And secondly, how can I run the tests manually? I can't find a binary inside the buildarea tree. Does it get deleted afterward? Yes, that's the 'clean' step of the buildbot build process. I'd suggest making another clone elsewhere (you can clone from the buildarea just to make the clone faster, but I'd leave the buildarea alone otherwise), then building and testing should be as simple as `./configure --with-pydebug make ./python -m test.test_posix`. As far as the failure itself, I have no comment. Apologies if these are dumb questions, hopefully they're a small distraction from PEP 460 arguments! It's kinda nice to get something non-PEP460 in the inbox this week :) -- Zach ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Test failures when running as root
On 2014-01-14 03:03, Terry Reedy wrote: On 1/13/2014 7:48 PM, Chris Angelico wrote: 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 try: g = max(self.saved_groups) + 1 except ValueError: g = 1 Alternatively: g = max(self.saved_groups, [1]) or even: g = max(self.saved_groups or [1]) ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Test failures when running as root
On Tue, Jan 14, 2014 at 2:14 PM, Zachary Ware zachary.ware+py...@gmail.com wrote: On Mon, Jan 13, 2014 at 6:48 PM, Chris Angelico ros...@gmail.com wrote: And secondly, how can I run the tests manually? I can't find a binary inside the buildarea tree. Does it get deleted afterward? Yes, that's the 'clean' step of the buildbot build process. I'd suggest making another clone elsewhere (you can clone from the buildarea just to make the clone faster, but I'd leave the buildarea alone otherwise), then building and testing should be as simple as `./configure --with-pydebug make ./python -m test.test_posix`. Doh. Yeah, I can see the 'clean' step in the build process, I should have known. Of course. Thanks, that's what I'll do then. ChrisA ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Test failures when running as root
On Tue, Jan 14, 2014 at 2:03 PM, Terry Reedy tjre...@udel.edu wrote: On 1/13/2014 7:48 PM, Chris Angelico wrote: ValueError: max() arg is an empty sequence try: g = max(self.saved_groups) + 1 except ValueError: g = 1 Unless someone says that it is a bug for posix.getgroups to return an empty list, I would say that the test should be fixed by trying the code above. I can't see anything in the getgroups man page [1] to suggest that it's a bug to return an empty list. But I can't replicate the behaviour either - not on the system Python, at least (2.7.3), hence the query about rerunning tests. Will raise an issue on the tracker. [1] eg http://linux.die.net/man/2/getgroups ChrisA ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Test failures when running as root
On 1/13/2014 10:16 PM, MRAB wrote: On 2014-01-14 03:03, Terry Reedy wrote: On 1/13/2014 7:48 PM, Chris Angelico wrote: 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 try: g = max(self.saved_groups) + 1 except ValueError: g = 1 Alternatively: g = max(self.saved_groups, [1]) This would be [1] instead of 1. or even: g = max(self.saved_groups or [1]) This is 1. -- Terry Jan Reedy ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com