Fix: tests: skip UST perf tests if not root
[lttng-tools.git] / tests / regression / ust / test_event_perf
index 7fb37edfeb1ff67a4dada6711384ac6c6a1a5b6d..7dc21681fd26deb291e10724f8a68fd6d368bf25 100755 (executable)
@@ -90,8 +90,17 @@ plan_tests $NUM_TESTS
 
 print_test_banner "$TEST_DESC"
 
 
 print_test_banner "$TEST_DESC"
 
-start_lttng_sessiond
+if [ "$(id -u)" == "0" ]; then
+        isroot=1
+else
+        isroot=0
+fi
+
+skip $isroot "Root access is needed. Skipping UST perf tests." ${NUM_TESTS} ||
+{
+       start_lttng_sessiond
 
 
-test_event_basic
+       test_event_basic
 
 
-stop_lttng_sessiond
+       stop_lttng_sessiond
+}
This page took 0.025469 seconds and 5 git commands to generate.