3 # Copyright (C) - 2012 David Goulet <dgoulet@efficios.com>
5 # This library is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU Lesser General Public License as published by the Free
7 # Software Foundation; version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with this library; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 TEST_DESC
="UST tracer - Multi-session"
22 SESSION_NAME
="multi-session"
23 EVENT_NAME
="ust_gen_nevents:tptest"
25 source $TESTDIR/utils.sh
27 print_test_banner
"$TEST_DESC"
29 if [ ! -x "$CURDIR/gen-nevents" ]; then
30 echo -e "No UST nevents binary detected. Passing."
34 # MUST set TESTDIR before calling those functions
36 test_multi_session
() {
39 # BEFORE application is spawned
40 for i
in `seq 0 3`; do
41 create_lttng_session
"$SESSION_NAME-$i" "$TRACE_PATH/$i"
42 enable_ust_lttng_event
"$SESSION_NAME-$i" "$EVENT_NAME$i"
43 start_lttng_tracing
"$SESSION_NAME-$i"
46 echo -n "Starting application generating $NR_ITER events... "
47 .
/$CURDIR/gen-nevents
$NR_ITER &
50 # At least hit one event
51 echo -n "Waiting for events to record "
52 while [ -n "$(pidof gen-nevents)" ]; do
58 for i
in `seq 0 3`; do
59 stop_lttng_tracing
"$SESSION_NAME-$i"
60 destroy_lttng_session
"$SESSION_NAME-$i"
61 out
=$
(babeltrace
"$TRACE_PATH/$i" |
grep "$EVENT_NAMEi$i" |
wc -l)
62 if [ $out -ne $NR_ITER ]; then
63 echo -n "No event found. Suppose to have at least one... "
67 echo -n "Found $out event(s) for $SESSION_NAME-$i. Coherent... "
76 # MUST set TESTDIR before calling those functions
80 TRACE_PATH
=$
(mktemp
-d)
84 if [ $out -ne 0 ]; then
This page took 0.033161 seconds and 5 git commands to generate.