diff options
author | 2021-07-17 15:14:59 +0100 | |
---|---|---|
committer | 2021-07-17 15:14:59 +0100 | |
commit | 43e9523f28b7d4ab4c2fa0ab8f5c7bdd431e53d8 (patch) | |
tree | f590e8120a67edb9ef021891efda170af5e0be6c | |
parent | chore: increase 3rd party thread limit environment variables (diff) |
test: update pid limit tests to account for new increased limit
-rw-r--r-- | tests/test_nsjail.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py index 8955b4a..ec5c56f 100644 --- a/tests/test_nsjail.py +++ b/tests/test_nsjail.py @@ -50,7 +50,16 @@ class NsJailTests(unittest.TestCase): def test_subprocess_resource_unavailable(self): code = dedent(""" import subprocess - print(subprocess.check_output('kill -9 6', shell=True).decode()) + + # Max PIDs is 5. + for _ in range(6): + print(subprocess.Popen( + [ + '/usr/local/bin/python3', + '-c', + 'import time; time.sleep(1)' + ], + ).pid) """).strip() result = self.nsjail.python3(code) |