summaryrefslogtreecommitdiff
path: root/yaksh/evaluator_tests/test_bash_evaluation.py
diff options
context:
space:
mode:
authormahesh2017-04-27 12:13:22 +0530
committermahesh2017-04-27 12:13:22 +0530
commitc431c255738b741698adffcbf894930ae298b8c0 (patch)
treeedc60add3a49225af039c3b7c443ac08df9b4998 /yaksh/evaluator_tests/test_bash_evaluation.py
parent2c43a6b0555df1dea207bec88ef1f930aa66b0b9 (diff)
downloadonline_test-c431c255738b741698adffcbf894930ae298b8c0.tar.gz
online_test-c431c255738b741698adffcbf894930ae298b8c0.tar.bz2
online_test-c431c255738b741698adffcbf894930ae298b8c0.zip
added tests to check killing of stray processes in hook evaluator
Diffstat (limited to 'yaksh/evaluator_tests/test_bash_evaluation.py')
-rw-r--r--yaksh/evaluator_tests/test_bash_evaluation.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/yaksh/evaluator_tests/test_bash_evaluation.py b/yaksh/evaluator_tests/test_bash_evaluation.py
index ee6949d..352e95f 100644
--- a/yaksh/evaluator_tests/test_bash_evaluation.py
+++ b/yaksh/evaluator_tests/test_bash_evaluation.py
@@ -536,6 +536,11 @@ class BashHookEvaluationTestCases(EvaluatorBaseTest):
# Then
self.assertFalse(result.get('success'))
self.assert_correct_output(self.timeout_msg, result.get('error'))
+ parent_proc = Process(os.getpid()).children()
+ if parent_proc:
+ self.assertFalse(any(Process(parent_proc[0].pid)\
+ .children(recursive=True)))
+
if __name__ == '__main__':