Test: enable kernel events after start
authorJulien Desfossez <jdesfossez@efficios.com>
Mon, 5 Aug 2013 19:04:04 +0000 (15:04 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 5 Aug 2013 19:04:04 +0000 (15:04 -0400)
This test detects if we actually append new metadata when enabling a
kernel event after a start.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/regression/kernel/test_event_basic

index 5c19744d3b4c0eeb5d74fd373b3931ae49622572..a182f9f21565327885b75c0570b2b024e1ca3bf6 100755 (executable)
@@ -19,7 +19,7 @@ TEST_DESC="Kernel tracer - Basic event"
 
 CURDIR=$(dirname $0)/
 TESTDIR=$CURDIR/../..
-NUM_TESTS=12
+NUM_TESTS=20
 
 source $TESTDIR/utils/utils.sh
 
@@ -46,6 +46,27 @@ function test_event_basic()
        rm -rf $TRACE_PATH
 }
 
+function test_enable_after_start()
+{
+       TRACE_PATH=$(mktemp -d)
+       SESSION_NAME="kernel_enable_after_start"
+
+       create_lttng_session $SESSION_NAME $TRACE_PATH
+
+       lttng_enable_kernel_event $SESSION_NAME "sched_switch"
+
+       start_lttng_tracing
+       lttng_enable_kernel_event $SESSION_NAME "sched_process_exit"
+       stop_lttng_tracing
+
+       validate_trace "sched_switch" $TRACE_PATH
+       validate_trace "sched_process_exit" $TRACE_PATH
+
+       destroy_lttng_session $SESSION_NAME
+
+       rm -rf $TRACE_PATH
+}
+
 # MUST set TESTDIR before calling those functions
 plan_tests $NUM_TESTS
 
@@ -62,6 +83,7 @@ skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
        start_lttng_sessiond
 
        test_event_basic
+       test_enable_after_start
 
        stop_lttng_sessiond
 }
This page took 0.033596 seconds and 4 git commands to generate.