Under OpenSolaris, I get the following failure: $ pfexec ./python -m test test_posix [1/1] test_posix test test_posix failed -- Traceback (most recent call last): File "/home/antoine/py3k/cc/Lib/test/test_posix.py", line 402, in test_getgroups set(posix.getgroups())) AssertionError: Items in the first set but not the second: 0
It seems to work fine on OpenIndiana (running normally or as root). According to the posix specification, "It is implementation-defined whether getgroups() also returns the effective group ID in the grouplist array." But, id -G prints all group IDs. Perhaps, it failed because 0 was the effective gid & it was included by "id -G" but wasn't being returned by posix.getgroups(). This fix changes the test to compare the output from "id -G" with the union of getgroups() & getegid().