[lttng-dev] [PATCH lttng-tools] Fix: mi test: possible race between listing UST events and testapp start

Jonathan Rajotte jonathan.r.julien at gmail.com
Sun Oct 26 21:21:46 EDT 2014


Signed-off-by: Jonathan Rajotte <jonathan.r.julien at gmail.com>
---
 tests/regression/tools/mi/test_mi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/regression/tools/mi/test_mi b/tests/regression/tools/mi/test_mi
index fa46b51..7acec18 100755
--- a/tests/regression/tools/mi/test_mi
+++ b/tests/regression/tools/mi/test_mi
@@ -507,6 +507,11 @@ function test_list_ust_event ()
 
 	#Begin testing
 	$TESTAPP_BIN $NR_USEC_WAIT & 2>/dev/null
+	pid=$!
+
+	#Wait for TESTAPP to run
+	while ! kill -0 $pid 2> /dev/null; do :; done
+
 	list_lttng_with_opts "-u -f"
 	$XML_VALIDATE $OUTPUT_DEST
 	ok $? "Mi test: list ust event xsd validation"
-- 
1.9.1




More information about the lttng-dev mailing list