Some distributions like Debian (e.g. Debian kernel 4.1.0-2-amd64) have
some grsecurity options enabled, such as CONFIG_GRKERNSEC_PERF_HARDEN.
Unfortunately, this option makes it impossible to use the SW page-fault
perf event as a normal user. It only leaves some HW events. However, we
can only use SW events within virtual machines.
Therefore, only run this test as root for now until we find a better
approach.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
regression/ust/clock-override/test_clock_override
regression/ust/test_event_basic
regression/ust/test_event_tracef
-regression/ust/test_event_perf
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
+}
regression/tools/filtering/test_unsupported_op
regression/tools/filtering/test_valid_filter
regression/tools/wildcard/test_event_wildcard
+regression/ust/test_event_perf