diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 978983048cce..eb1f27ef3f51 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -682,6 +682,13 @@ def test_getgroups(self): if ret is not 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 195b5ace2855..e4184950ba6e 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -796,6 +796,9 @@ Tests - Issue #15557: Added a test suite for the webbrowser module, thanks to Anton Barkovsky. +- Issue #16698: Skip posix test_getgroups when built with OS X + deployment target prior to 10.6. + Build -----