tests: add check_skip_kernel_test to check root user and lttng kernel modules
[lttng-tools.git] / tests / regression / tools / live / test_kernel
index 1be703aacf5d4b2e9a48f789afd5ebfbcdbdd1aa..df30fcf56242e940ec974af197414de788bf95fe 100755 (executable)
@@ -39,13 +39,11 @@ function clean_live_tracing()
        rm -rf $TRACE_PATH
 }
 
-# Need root access for kernel tracing.
-if [ "$(id -u)" == "0" ]; then
-       isroot=1
-else
-       plan_skip_all "Root access is needed. Skipping all tests."
+check_skip_kernel_test &&
+{
+       plan_skip_all "Skipping all tests."
        exit 0
-fi
+}
 
 modprobe lttng-test
 
This page took 0.024032 seconds and 4 git commands to generate.