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
18 TEST_DESC
="UST tracer - Generate $NR_ITER process"
21 TESTDIR
=$CURDIR/..
/..
/..
22 TEST_BIN_NAME
="gen-events-time"
23 SESSION_NAME
="ust-nprocesses"
24 EVENT_NAME
="ust_gen_event:tptest"
28 source $TESTDIR/utils
/utils.sh
30 print_test_banner
"$TEST_DESC"
32 if [ ! -x "$CURDIR/$TEST_BIN_NAME" ]; then
33 BAIL_OUT
"No UST $TEST_BIN_NAME binary detected."
36 # MUST set TESTDIR before calling those functions
42 # Start test for 1000 seconds
44 for i
in `seq 1 $NR_ITER`
46 .
/$CURDIR/$TEST_BIN_NAME 1000 >/dev
/null
2>&1 &
50 while [ $reg_app_count -ne $NR_ITER ]; do
51 listing
=$
($TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN list
-u)
52 reg_app_count
=$
(echo -n $listing |
sed "s/$TEST_BIN_NAME/$TEST_BIN_NAME\n/g" |
grep "$TEST_BIN_NAME" |
wc -l)
55 pass
"Trace validation"
57 TRACE_PATH
=$
(mktemp
-d)
59 create_lttng_session
$SESSION_NAME $TRACE_PATH
61 enable_ust_lttng_event
$SESSION_NAME $EVENT_NAME
62 start_lttng_tracing
$SESSION_NAME
64 diag
"Sleeping $TEST_WAIT_SEC seconds for tracing to start everywhere"
65 diag
"Warning: this arbitrary time can make the test fail on slower system"
69 stop_lttng_tracing
$SESSION_NAME
70 destroy_lttng_session
$SESSION_NAME
74 while [ -n "$(pidof $TEST_BIN_NAME)" ]; do
75 killall
-s PIPE
-q $TEST_BIN_NAME >/dev
/null
2>&1
80 pass
"Kill all spawned applications"
This page took 0.03661 seconds and 5 git commands to generate.