X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=tests%2Futils%2Futils.sh;h=0583b5c1999b757595e430b1032b493851564136;hb=759bfaad8fa2ab638035e495ce1a68df9747f1cc;hp=88a4ddd20c30216d6f19ea07b4160df998cb3c9b;hpb=d78d26e1dbfed62522361bad211f2753f6e89f0c;p=lttng-tools.git diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 88a4ddd20..0583b5c19 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -139,10 +139,19 @@ function conf_proc_count() # Bail out on failure function validate_lttng_modules_present () { + # Check for loadable modules. modprobe -n lttng-tracer 2>/dev/null - if [ $? -ne 0 ]; then - BAIL_OUT "LTTng modules not detected." + if [ $? -eq 0 ]; then + return 0 fi + + # Check for builtin modules. + ls /proc/lttng > /dev/null 2>&1 + if [ $? -eq 0 ]; then + return 0 + fi + + BAIL_OUT "LTTng modules not detected." } function enable_kernel_lttng_event