diff options
| author | Martin Panter <vadmium+py@gmail.com> | 2015-12-05 05:42:18 (GMT) |
|---|---|---|
| committer | Martin Panter <vadmium+py@gmail.com> | 2015-12-05 05:42:18 (GMT) |
| commit | aa0780801c7a53760296de5c7c9ee0fe6562b6bc (patch) | |
| tree | 2971bbece8734ce7afe4648cca99f1cf087d648f /Lib | |
| parent | 2d2af91da033d3f9d5c68d4ea90a2d84d7f189f6 (diff) | |
| download | cpython-aa0780801c7a53760296de5c7c9ee0fe6562b6bc.zip cpython-aa0780801c7a53760296de5c7c9ee0fe6562b6bc.tar.gz cpython-aa0780801c7a53760296de5c7c9ee0fe6562b6bc.tar.bz2 | |
Issue #25764: OS X now failing on the second setrlimit() call
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/test/test_subprocess.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index b68def5..ed1b213 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -1520,14 +1520,17 @@ class POSIXProcessTestCase(BaseTestCase): except ImportError as err: self.skipTest(err) # RLIMIT_NPROC is specific to Linux and BSD limits = getrlimit(RLIMIT_NPROC) + [_, hard] = limits try: setrlimit(RLIMIT_NPROC, limits) + setrlimit(RLIMIT_NPROC, (0, hard)) except ValueError as err: - # Seems to happen on AMD64 Snow Leop and x86-64 Yosemite buildbots - print(f"Setting NPROC to {limits!r}: {err!r}, RLIM_INFINITY={RLIM_INFINITY!r}") - self.skipTest("Setting existing NPROC limit failed") - [_, hard] = limits - setrlimit(RLIMIT_NPROC, (0, hard)) + # Seems to happen on various OS X buildbots + print( + f"Setting NPROC failed: {err!r}, limits={limits!r}, " + f"RLIM_INFINITY={RLIM_INFINITY!r}, " + f"getrlimit() -> {getrlimit(RLIMIT_NPROC)!r}") + self.skipTest("Setting NPROC limit failed") self.addCleanup(setrlimit, RLIMIT_NPROC, limits) # Forking should raise EAGAIN, translated to BlockingIOError with self.assertRaises(BlockingIOError): |
