aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_nsjail.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py
index 0b755b2..852be4b 100644
--- a/tests/test_nsjail.py
+++ b/tests/test_nsjail.py
@@ -174,3 +174,12 @@ class NsJailTests(unittest.TestCase):
msg="stdout does not come before stderr"
)
self.assertEqual(result.stderr, None)
+
+ def test_stdout_flood_results_in_graceful_sigterm(self):
+ stdout_flood = dedent("""
+ while True:
+ print('abcdefghij')
+ """).strip()
+
+ result = self.nsjail.python3(stdout_flood)
+ self.assertEqual(result.returncode, 143)