From 86546faf995a02dce38601cdcd7785669aafb540 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 29 Sep 2016 00:03:42 -0400 Subject: [PATCH] Test fix: test_fork can hang while waiting for child pids MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- tests/regression/ust/fork/test_fork.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/regression/ust/fork/test_fork.py b/tests/regression/ust/fork/test_fork.py index 3baa8cc38..7288bcc37 100644 --- a/tests/regression/ust/fork/test_fork.py +++ b/tests/regression/ust/fork/test_fork.py @@ -43,8 +43,6 @@ enable_ust_tracepoint_event(session_info, "ust_tests_fork*") start_session(session_info) fork_process = subprocess.Popen([test_path + "fork", test_path + "fork2"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) -fork_process.wait() - parent_pid = -1 child_pid = -1 for line in fork_process.stdout: @@ -56,6 +54,8 @@ for line in fork_process.stdout: if match: parent_pid = match.group(1) +fork_process.wait() + print_test_result(fork_process.returncode == 0, current_test, "Fork test application exited normally") current_test += 1 -- 2.34.1