aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_nsjail.py
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2020-11-20 23:46:19 +0100
committerGravatar Sebastiaan Zeeff <[email protected]>2020-11-20 23:47:18 +0100
commit162e669032f377e0ba3751ed5a924c84789696d8 (patch)
treec6bdeaa6df8fc76bc95f21973a1cf44a261f2d48 /tests/test_nsjail.py
parentDocument output truncation in README (diff)
Convert negative exit codes into standard form
When you send a signal `N` to a subprocess using Popen, it will return `-N` as its exit code. As the rest of the code returns signal exit codes as `128 + N`, we convert those negative exit codes into the standard form used by the rest of the code.
Diffstat (limited to 'tests/test_nsjail.py')
-rw-r--r--tests/test_nsjail.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py
index 4a040e7..691eb5b 100644
--- a/tests/test_nsjail.py
+++ b/tests/test_nsjail.py
@@ -182,4 +182,4 @@ class NsJailTests(unittest.TestCase):
""").strip()
result = self.nsjail.python3(stdout_flood)
- self.assertEqual(result.returncode, -9)
+ self.assertEqual(result.returncode, 137)