tests: add check_skip_kernel_test to check root user and lttng kernel modules
[lttng-tools.git] / tests / regression / tools / health / test_thread_ok
index 663b7e4cb2eab1bf9bd1bb5ea7d9bb9a5f336c59..5441b2f064b56eb74ecce145c1f5b64268b14aa3 100755 (executable)
@@ -67,7 +67,7 @@ function test_thread_ok
        $CURDIR/$HEALTH_CHECK_BIN > ${STDOUT_PATH} 2> ${STDERR_PATH}
        report_errors
 
-       skip $isroot "Root access is needed. Skipping kernel consumer health check test." "5" ||
+       check_skip_kernel_test "5" "Skipping kernel consumer health check test." ||
        {
                diag "With kernel consumer daemon"
                create_lttng_session_no_output $SESSION_NAME
@@ -115,13 +115,6 @@ STDERR_PATH=$(mktemp -t tmp.test_thread_ok_stderr_path.XXXXXX)
 TRACE_PATH=$(mktemp -d -t tmp.test_thread_ok_trace_path.XXXXXX)
 HEALTH_PATH=$(mktemp -d -t tmp.test_thread_ok_trace_path.XXXXXX)
 
-# The manage kernel thread is only spawned if we are root
-if [ "$(id -u)" == "0" ]; then
-       isroot=1
-else
-       isroot=0
-fi
-
 test_thread_ok
 
 rm -rf ${HEALTH_PATH}
This page took 0.026762 seconds and 4 git commands to generate.