3 # Copyright (C) - 2013 Julien Desfossez <julien.desfossez@efficios.com>
4 # David Goulet <dgoulet@efficios.com>
6 # This library is free software; you can redistribute it and/or modify it under
7 # the terms of the GNU Lesser General Public License as published by the Free
8 # Software Foundation; version 2.1 of the License.
10 # This library is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with this library; if not, write to the Free Software Foundation, Inc.,
17 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 TEST_DESC
="Live - User space tracing"
22 TESTDIR
=$CURDIR/..
/..
/..
/
23 SESSIOND_BIN
="lttng-sessiond"
24 RELAYD_BIN
="lttng-relayd"
26 BABELTRACE_BIN
="babeltrace"
30 TESTAPP_PATH
="$TESTDIR/utils/testapp"
31 TESTAPP_NAME
="gen-ust-events"
32 TESTAPP_BIN
="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
35 EVENT_NAME
="tp:tptest"
37 TRACE_PATH
=$
(mktemp
-d)
39 DIR
=$
(readlink
-f $TESTDIR)
43 source $TESTDIR/utils
/utils.sh
45 # MUST set TESTDIR before calling those functions
48 print_test_banner
"$TEST_DESC"
50 function test_custom_url
()
52 # Create session with custom URL
53 $TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN create
$SESSION_NAME --live $DELAY_USEC \
54 -C tcp
://localhost
:1819 -D tcp
://localhost
:9187 >/dev
/null
2>&1
55 ok $?
"Create session in live mode with delay $DELAY_USEC and custom URLs"
58 function setup_live_tracing
()
60 # Create session with default path
61 $TESTDIR/..
/src
/bin
/lttng
/$LTTNG_BIN create
$SESSION_NAME --live $DELAY_USEC \
62 -U net
://localhost
>/dev
/null
2>&1
63 ok $?
"Create session in live mode with delay $DELAY_USEC"
65 enable_ust_lttng_event
$SESSION_NAME $EVENT_NAME
66 start_lttng_tracing
$SESSION_NAME
69 function clean_live_tracing
()
71 stop_lttng_tracing
$SESSION_NAME
72 destroy_lttng_session
$SESSION_NAME
76 start_lttng_relayd
"-o $TRACE_PATH"
80 # Run app in background
81 $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT >/dev
/null
2>&1
85 trace_match_only
$EVENT_NAME $NR_ITER $TRACE_PATH
This page took 0.040633 seconds and 4 git commands to generate.