X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=tests%2Fregression%2Fust%2Fmulti-session%2Ftest_multi_session;h=5a58515d53715f130a3ddab189882e463fec9a83;hb=7539dcec4401832f0557f85daf6c8564615170f6;hp=313a7d70fa9c408d529d4fca80a2a56d5c0233d2;hpb=e3bef7256ce348cf232ede3f36721e661cfda2a7;p=lttng-tools.git diff --git a/tests/regression/ust/multi-session/test_multi_session b/tests/regression/ust/multi-session/test_multi_session index 313a7d70f..5a58515d5 100755 --- a/tests/regression/ust/multi-session/test_multi_session +++ b/tests/regression/ust/multi-session/test_multi_session @@ -1,19 +1,9 @@ #!/bin/bash # -# Copyright (C) - 2012 David Goulet +# Copyright (C) 2012 David Goulet # -# This library is free software; you can redistribute it and/or modify it under -# the terms of the GNU Lesser General Public License as published by the Free -# Software Foundation; version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more -# details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# SPDX-License-Identifier: LGPL-2.1-only + TEST_DESC="UST tracer - Multi-session" CURDIR=$(dirname $0)/ @@ -36,24 +26,20 @@ test_multi_session() { # BEFORE application is spawned for i in `seq 0 3`; do - create_lttng_session "$SESSION_NAME-$i" "$TRACE_PATH/$i" - enable_ust_lttng_event "$SESSION_NAME-$i" "$EVENT_NAME$i" - start_lttng_tracing "$SESSION_NAME-$i" + create_lttng_session_ok "$SESSION_NAME-$i" "$TRACE_PATH/$i" + enable_ust_lttng_event_ok "$SESSION_NAME-$i" "$EVENT_NAME$i" + start_lttng_tracing_ok "$SESSION_NAME-$i" done ./$CURDIR/gen-nevents $NR_ITER & ok $? "Start application to generate $NR_ITER events" - # At least hit one event - while [ -n "$(pidof gen-nevents)" ]; do - sleep 0.1 - done - + wait 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" + stop_lttng_tracing_ok "$SESSION_NAME-$i" + destroy_lttng_session_ok "$SESSION_NAME-$i" out=$(babeltrace "$TRACE_PATH/$i" | grep "$EVENT_NAMEi$i" | wc -l) if [ $out -ne $NR_ITER ]; then fail "Trace validation of $SESSION_NAME-$i" @@ -78,7 +64,7 @@ print_test_banner "$TEST_DESC" start_lttng_sessiond -TRACE_PATH=$(mktemp -d) +TRACE_PATH=$(mktemp --tmpdir -d tmp.test_multi_session_ust.XXXXXX) test_multi_session out=$?