Tests: use modprobe to test for the presence of lttng-modules
[lttng-tools.git] / tests / regression / tools / streaming / test_kernel
index 5718201b8bec515e13c46741dc009554b4b74b72..6bb23d9f54e7da4a967e57d1b58e660297a0f312 100755 (executable)
@@ -28,12 +28,6 @@ NUM_TESTS=10
 
 source $TESTDIR/utils/utils.sh
 
-# LTTng kernel modules check
-out=`ls /lib/modules/$(uname -r)/extra | grep lttng`
-if [ -z "$out" ]; then
-       BAIL_OUT "LTTng modules not detected."
-fi
-
 function lttng_create_session_uri
 {
        # Create session with default path
@@ -50,8 +44,8 @@ function test_kernel_before_start ()
        start_lttng_tracing_ok $SESSION_NAME
        # Give a second
        sleep 1
-       stop_lttng_tracing $SESSION_NAME
-       destroy_lttng_session $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
+       destroy_lttng_session_ok $SESSION_NAME
 }
 
 # Deactivated since this feature is not yet available where we can enable
@@ -64,8 +58,8 @@ function test_kernel_after_start ()
        lttng_enable_kernel_event $SESSION_NAME $EVENT_NAME
        # Give a second
        sleep 1
-       stop_lttng_tracing $SESSION_NAME
-       destroy_lttng_session $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
+       destroy_lttng_session_ok $SESSION_NAME
 }
 
 plan_tests $NUM_TESTS
@@ -80,6 +74,8 @@ fi
 
 skip $isroot "Root access is needed. Skipping all kernel streaming tests." $NUM_TESTS ||
 {
+       validate_lttng_modules_present
+
        start_lttng_relayd "-o $TRACE_PATH"
        start_lttng_sessiond
 
This page took 0.024211 seconds and 4 git commands to generate.