diff options
Diffstat (limited to 'tests/test_nsjail.py')
-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) |