X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fstreaming%2Ftest_ust;h=2d49cde31cfe5bc450064eb06a4f865f974aa876;hb=7972aab22f74b18faa168c0482216a3dd711a075;hp=6e6e5a752e2ecb8288c2e22506c629d69d0178ac;hpb=ef8343605f92072ca2ed7174b0cc2594ee33dfab;p=lttng-tools.git diff --git a/tests/regression/tools/streaming/test_ust b/tests/regression/tools/streaming/test_ust index 6e6e5a752..2d49cde31 100755 --- a/tests/regression/tools/streaming/test_ust +++ b/tests/regression/tools/streaming/test_ust @@ -25,36 +25,36 @@ PID_RELAYD=0 TRACE_PATH=$(mktemp -d) +NUM_TESTS=18 + source $TESTDIR/utils/utils.sh print_test_banner "$TEST_DESC" if [ ! -x "$CURDIR/$BIN_NAME" ]; then - echo -e "No UST nevents binary detected. Passing." - exit 0 + BAIL_OUT "No UST nevents binary detected." fi function lttng_create_session_uri { # Create session with default path $TESTDIR/../src/bin/lttng/$LTTNG_BIN create $SESSION_NAME -U net://localhost >/dev/null 2>&1 + ok $? "Create session with default path" } function wait_apps { - echo -n "Waiting for applications to end" while [ -n "$(pidof $BIN_NAME)" ]; do - echo -n "." sleep 0.5 done - echo "" + pass "Wait for applications to end" } # MUST set TESTDIR before calling those functions function test_ust_before_start () { - echo -e "\n=== Testing UST streaming BEFORE tracing starts\n" + diag "Test UST streaming BEFORE tracing starts" lttng_create_session_uri enable_ust_lttng_event $SESSION_NAME $EVENT_NAME @@ -64,13 +64,14 @@ function test_ust_before_start () start_lttng_tracing $SESSION_NAME wait_apps + stop_lttng_tracing $SESSION_NAME destroy_lttng_session $SESSION_NAME } function test_ust_after_start () { - echo -e "\n=== Testing UST streaming AFTER tracing starts\n" + diag "Test UST streaming AFTER tracing starts" lttng_create_session_uri enable_ust_lttng_event $SESSION_NAME $EVENT_NAME start_lttng_tracing $SESSION_NAME @@ -79,12 +80,15 @@ function test_ust_after_start () ./$CURDIR/$BIN_NAME 5 1000000 >/dev/null 2>&1 & wait_apps + stop_lttng_tracing $SESSION_NAME destroy_lttng_session $SESSION_NAME } -start_lttng_sessiond +plan_tests $NUM_TESTS + start_lttng_relayd "-o $TRACE_PATH" +start_lttng_sessiond tests=( test_ust_before_start test_ust_after_start ) @@ -103,7 +107,6 @@ do fi done -echo "" stop_lttng_sessiond stop_lttng_relayd