Backport: Tests: use modprobe to test for the presence of lttng-modules
[lttng-tools.git] / tests / utils / utils.sh
index e7147c36636e6c20ce8bdf292404c70834c84da2..53e80f53356def250e1ff6658e1342f49e147715 100644 (file)
@@ -125,6 +125,16 @@ function conf_proc_count()
        echo
 }
 
+# Check if base lttng-modules are present.
+# Bail out on failure
+function validate_lttng_modules_present ()
+{
+       modprobe -n lttng-tracer 2>/dev/null
+       if [ $? -ne 0  ]; then
+               BAIL_OUT "LTTng modules not detected."
+       fi
+}
+
 function enable_kernel_lttng_event
 {
        local withtap="$1"
This page took 0.023257 seconds and 5 git commands to generate.