Fix: test_mi test
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 6 Aug 2015 19:52:37 +0000 (15:52 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 6 Aug 2015 20:37:30 +0000 (16:37 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/mi/test_mi

index e690822b5661ad3938c3ba43fe6ec3cdbc8fdc07..941dae0cf134ba329a7f29dc2ff8b163db97cf59 100755 (executable)
@@ -27,8 +27,8 @@ RELAYD_BIN="lttng-relayd"
 TESTAPP_PATH="$TESTDIR/utils/testapp"
 TESTAPP_NAME="gen-ust-events"
 TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
-NR_USEC_WAIT=10000
-
+NR_USEC_WAIT=0
+NR_ITER=10000
 
 #Temp file output
 OUTPUT_DIR=$(mktemp -d)
@@ -500,14 +500,25 @@ function test_list_session ()
 
 function test_list_ust_event ()
 {
+       local file_sync_after_first=$(mktemp -u)
+       local file_sync_before_last=$(mktemp -u)
+
        OUTPUT_FILE="list_ust_event.xml"
 
        #Test buid up
        OUTPUT_DEST=$OUTPUT_DIR/$OUTPUT_FILE
 
        #Begin testing
-       $TESTAPP_BIN $NR_USEC_WAIT & 2>/dev/null
+       $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ${file_sync_after_first} ${file_sync_before_last} & 2>/dev/null
+
+       while [ ! -f "${file_sync_after_first}" ]; do
+               sleep 0.5
+       done
+
        list_lttng_with_opts "-u -f"
+
+       touch ${file_sync_before_last}
+
        $XML_VALIDATE $OUTPUT_DEST
        ok $? "Mi test: list ust event xsd validation"
 
@@ -525,6 +536,9 @@ function test_list_ust_event ()
 
        #Wait for all background processes
        wait
+
+       rm -f ${file_sync_after_first}
+       rm -f ${file_sync_before_last}
 }
 
 function test_start_stop () {
This page took 0.027065 seconds and 4 git commands to generate.