tests: add check_skip_kernel_test to check root user and lttng kernel modules
[lttng-tools.git] / tests / regression / ust / namespaces / test_ns_contexts_change
index fd16216309bf25a19474f4fe016118f5e3e6a925..ac14748ee1cb93de842cbd55aaac98542812db61 100755 (executable)
@@ -103,12 +103,7 @@ print_test_banner "$TEST_DESC"
 
 bail_out_if_no_babeltrace
 
-isroot=0
-if [ "$(id -u)" == "0" ]; then
-       isroot=1
-fi
-
-skip $isroot "Root access is needed. Skipping all tests." "$NUM_TESTS" && exit 0
+check_skip_kernel_test "$NUM_TESTS" "Skipping all tests." && exit 0
 
 system_has_ns=0
 if [ -d "/proc/$$/ns" ]; then
This page took 0.023165 seconds and 4 git commands to generate.