3 # Copyright (C) 2016 Julien Desfossez <jdesfossez@efficios.com>
5 # SPDX-License-Identifier: LGPL-2.1-only
7 TEST_DESC
="Regenerate the statedump - Kernel tracing"
10 TESTDIR
=$CURDIR/..
/..
/..
11 EVENT_NAME
="lttng_test_filter_event"
13 EVENT_NAME
="lttng_statedump_start,lttng_statedump_end"
15 TRACE_PATH
=$
(mktemp
-d -t tmp.test_regenerate_statedump_kernel_trace_path.XXXXXX
)
19 source $TESTDIR/utils
/utils.sh
21 function test_kernel_local
()
23 diag
"Test kernel local with statedump regeneration"
24 create_lttng_session_ok
$SESSION_NAME $TRACE_PATH
25 lttng_enable_kernel_event
$SESSION_NAME $EVENT_NAME
26 start_lttng_tracing_ok
$SESSION_NAME
27 echo -n "100" > /proc
/lttng-test-filter-event
28 regenerate_statedump_ok
$SESSION_NAME
29 stop_lttng_tracing_ok
$SESSION_NAME
30 validate_trace_count
$EVENT_NAME $TRACE_PATH 4
32 # Only delete if successful
35 destroy_lttng_session_ok
$SESSION_NAME
40 print_test_banner
"$TEST_DESC"
42 check_skip_kernel_test
"$NUM_TESTS" "Skipping all tests." ||
44 validate_lttng_modules_present
48 tests
=( test_kernel_local
)
50 for fct_test
in ${tests[@]};
52 SESSION_NAME
=$
(randstring
16 0)
56 modprobe
--remove lttng-test