Tests: use modprobe to test for the presence of lttng-modules
[lttng-tools.git] / tests / regression / tools / streaming / test_kernel
index 68b7247b60feef9247e41472045340b85fbb09f7..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
@@ -51,7 +45,7 @@ function test_kernel_before_start ()
        # Give a second
        sleep 1
        stop_lttng_tracing_ok $SESSION_NAME
-       destroy_lttng_session $SESSION_NAME
+       destroy_lttng_session_ok $SESSION_NAME
 }
 
 # Deactivated since this feature is not yet available where we can enable
@@ -65,7 +59,7 @@ function test_kernel_after_start ()
        # Give a second
        sleep 1
        stop_lttng_tracing_ok $SESSION_NAME
-       destroy_lttng_session $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.024874 seconds and 4 git commands to generate.