Commit 845c9fb4 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler Abort if run as root

`ninja test` invokes for each test binary to check
the behavior of some of the switches. One of the verified things is that
the test exists with non-zero status when requesting invalid subtest.

`--run-subtest` results in igt_fixtures being executed - this fiddles
with the device and sysfs knobs.

Let's exit early, if we are root, to save people form unintentional
side-effects and strange failures.

Cc: Petri Latvala <>
Cc: Andi Shyti <>
Signed-off-by: default avatarArkadiusz Hiler <>
Reviewed-by: Daniel Vetter's avatarDaniel Vetter <>
parent ed32029e
Pipeline #18718 failed with stages
in 6 minutes and 12 seconds
......@@ -100,6 +100,10 @@ check_test ()
./$test --run-subtest invalid-subtest > /dev/null 2>&1 && fail $test
if [ "$EUID" -eq 0 ]; then
fail "Don't run $0 as root. It executes igt_fixture blocks."
if [ ! -r "$TESTLISTFILE" ]; then
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment