From: Ned Deily Date: Sat, 2 Feb 2013 23:06:45 +0000 (-0800) Subject: Issue #16698: Skip posix test_getgroups when built with OS X X-Git-Tag: v2.7.4rc1~156 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc23cc672ff9164900b717bcc7f6484c03328bc0;p=thirdparty%2FPython%2Fcpython.git Issue #16698: Skip posix test_getgroups when built with OS X deployment target prior to 10.6. --- diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 7214efa323d9..2fba3307d996 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -452,6 +452,13 @@ class PosixTester(unittest.TestCase): if ret != None or not groups: raise unittest.SkipTest("need working 'id -G'") + # Issues 16698: OS X ABIs prior to 10.6 have limits on getgroups() + if sys.platform == 'darwin': + import sysconfig + dt = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') or '10.0' + if float(dt) < 10.6: + raise unittest.SkipTest("getgroups(2) is broken prior to 10.6") + # 'id -G' and 'os.getgroups()' should return the same # groups, ignoring order and duplicates. # #10822 - it is implementation defined whether posix.getgroups() diff --git a/Misc/NEWS b/Misc/NEWS index 749b718cc75d..9c9bc108fe31 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -763,6 +763,9 @@ Tests - Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing a test failure in test_ssl. +- Issue #16698: Skip posix test_getgroups when built with OS X + deployment target prior to 10.6. + Build -----