fix: relayd: unaligned access in trace_chunk_registry_ht_key_hash
[lttng-tools.git] / tests / regression / tools / live / test_kernel
CommitLineData
1b368955
JD
1#!/bin/bash
2#
9d16b343
MJ
3# Copyright (C) 2013 Julien Desfossez <julien.desfossez@efficios.com>
4# Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
1b368955 5#
9d16b343 6# SPDX-License-Identifier: LGPL-2.1-only
1b368955
JD
7
8TEST_DESC="Live - Kernel space tracing"
9
10CURDIR=$(dirname $0)/
11TESTDIR=$CURDIR/../../../
1b368955
JD
12NR_ITER=1
13NR_USEC_WAIT=1
14DELAY_USEC=2000000
15
16SESSION_NAME="live"
bd37c3c5 17EVENT_NAME="lttng_test_filter_event"
1b368955 18
8d5a3312 19TRACE_PATH=$(mktemp -d -t tmp.test_live_kernel_trace_path.XXXXXX)
1b368955
JD
20
21DIR=$(readlink -f $TESTDIR)
22
23source $TESTDIR/utils/utils.sh
24
25function setup_live_tracing()
26{
27 # Create session with default path
28 $TESTDIR/../src/bin/lttng/$LTTNG_BIN create $SESSION_NAME --live $DELAY_USEC \
29 -U net://localhost >/dev/null 2>&1
30
31 $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event "$EVENT_NAME" -s $SESSION_NAME -k >/dev/null 2>&1
32 $TESTDIR/../src/bin/lttng/$LTTNG_BIN start $SESSION_NAME >/dev/null 2>&1
33}
34
35function clean_live_tracing()
36{
37 $TESTDIR/../src/bin/lttng/$LTTNG_BIN stop $SESSION_NAME >/dev/null 2>&1
38 $TESTDIR/../src/bin/lttng/$LTTNG_BIN destroy $SESSION_NAME >/dev/null 2>&1
39 rm -rf $TRACE_PATH
40}
41
3a174400
XC
42check_skip_kernel_test &&
43{
44 plan_skip_all "Skipping all tests."
1b368955 45 exit 0
3a174400 46}
1b368955 47
bd37c3c5
FD
48modprobe lttng-test
49
05aa48da
MD
50start_lttng_sessiond_notap
51start_lttng_relayd_notap "-o $TRACE_PATH"
1b368955
JD
52
53setup_live_tracing
54
bd37c3c5
FD
55echo -n "1" > /proc/lttng-test-filter-event
56
1b368955
JD
57# Start the live test
58$TESTDIR/regression/tools/live/live_test
59
60clean_live_tracing
61
05aa48da
MD
62stop_lttng_relayd_notap
63stop_lttng_sessiond_notap
bd37c3c5
FD
64
65modprobe --remove lttng-test
This page took 0.121074 seconds and 4 git commands to generate.