projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Tests with racy event validation
[lttng-tools.git]
/
tests
/
regression
/
tools
/
streaming
/
test_ust
diff --git
a/tests/regression/tools/streaming/test_ust
b/tests/regression/tools/streaming/test_ust
index 785a9a8353efe813dc6fd66f318386f8afa3684e..4c7ac976f870abc8029b4ddc5d5bbb1b076de6b9 100755
(executable)
--- a/
tests/regression/tools/streaming/test_ust
+++ b/
tests/regression/tools/streaming/test_ust
@@
-29,7
+29,7
@@
PID_RELAYD=0
TRACE_PATH=$(mktemp -d)
TRACE_PATH=$(mktemp -d)
-NUM_TESTS=1
8
+NUM_TESTS=1
6
source $TESTDIR/utils/utils.sh
source $TESTDIR/utils/utils.sh
@@
-44,13
+44,6
@@
function lttng_create_session_uri
ok $? "Create session with default path"
}
ok $? "Create session with default path"
}
-function wait_apps
-{
- while [ -n "$(pidof $TESTAPP_NAME)" ]; do
- sleep 0.5
- done
- pass "Wait for applications to end"
-}
# MUST set TESTDIR before calling those functions
# MUST set TESTDIR before calling those functions
@@
-64,8
+57,8
@@
function test_ust_before_start ()
$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1 &
start_lttng_tracing $SESSION_NAME
$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1 &
start_lttng_tracing $SESSION_NAME
-
- wait
_apps
+ # Wait for the applications started in background
+ wait
${!}
stop_lttng_tracing $SESSION_NAME
destroy_lttng_session $SESSION_NAME
stop_lttng_tracing $SESSION_NAME
destroy_lttng_session $SESSION_NAME
@@
-79,9
+72,7
@@
function test_ust_after_start ()
start_lttng_tracing $SESSION_NAME
# Run 5 times with a 1 second delay
start_lttng_tracing $SESSION_NAME
# Run 5 times with a 1 second delay
- $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1 &
-
- wait_apps
+ $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev/null 2>&1
stop_lttng_tracing $SESSION_NAME
destroy_lttng_session $SESSION_NAME
stop_lttng_tracing $SESSION_NAME
destroy_lttng_session $SESSION_NAME
This page took
0.023904 seconds
and
4
git commands to generate.