NR_ITER=100
SESSION_NAME="multi-session"
EVENT_NAME="ust_gen_nevents:tptest"
+NUM_TESTS=28
source $TESTDIR/utils/utils.sh
print_test_banner "$TEST_DESC"
if [ ! -x "$CURDIR/gen-nevents" ]; then
- echo -e "No UST nevents binary detected. Passing."
- exit 0
+ BAIL_OUT "No UST nevents binary detected."
fi
# MUST set TESTDIR before calling those functions
start_lttng_tracing "$SESSION_NAME-$i"
done
- echo -n "Starting application generating $NR_ITER events... "
./$CURDIR/gen-nevents $NR_ITER &
- print_ok
+ ok $? "Start application to generate $NR_ITER events"
# At least hit one event
- echo -n "Waiting for events to record "
while [ -n "$(pidof gen-nevents)" ]; do
- echo -n "."
sleep 0.1
done
- print_ok
+
+ pass "Wait for events to record"
for i in `seq 0 3`; do
stop_lttng_tracing "$SESSION_NAME-$i"
destroy_lttng_session "$SESSION_NAME-$i"
out=$(babeltrace "$TRACE_PATH/$i" | grep "$EVENT_NAMEi$i" | wc -l)
if [ $out -ne $NR_ITER ]; then
- echo -n "No event found. Suppose to have at least one... "
- print_fail
+ fail "Trace validation of $SESSION_NAME-$i"
+ diag "No events found."
out=1
+ break
else
- echo -n "Found $out event(s) for $SESSION_NAME-$i. Coherent... "
- print_ok
+ pass "Trace validation of $SESSION_NAME-$i"
+ diag "Found $out event(s) for $SESSION_NAME-$i."
out=0
fi
done
# MUST set TESTDIR before calling those functions
+plan_tests $NUM_TESTS
+
start_lttng_sessiond
TRACE_PATH=$(mktemp -d)