tests: add check_skip_kernel_test to check root user and lttng kernel modules
[lttng-tools.git] / tests / regression / tools / live / test_lttng_kernel
index ae8c57e6b4a2191050f648d0b8a976e1e1922e6c..94f2c008729c4db25abfd74500b288a41238e4eb 100755 (executable)
@@ -45,13 +45,7 @@ function clean_live_tracing()
 }
 
 # Need root access for kernel tracing.
-if [ "$(id -u)" == "0" ]; then
-       isroot=1
-else
-       isroot=0
-fi
-
-skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
+check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." ||
 {
        modprobe lttng-test
 
This page took 0.024081 seconds and 4 git commands to generate.