Commit 6d771c60 authored by Shuah Khan's avatar Shuah Khan

selftests: ir: skip when non-root user runs the test

Skip instead of fail when non-root user runs the test.
Signed-off-by: default avatarShuah Khan <shuah@kernel.org>
Acked-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarShuah Khan <shuah@kernel.org>
parent a5180977
......@@ -4,6 +4,11 @@
# Kselftest framework requirement - SKIP code is 4.
ksft_skip=4
if [ $UID != 0 ]; then
echo "Please run ir_loopback test as root [SKIP]"
exit $ksft_skip
fi
if ! /sbin/modprobe -q -n rc-loopback; then
echo "ir_loopback: module rc-loopback is not found [SKIP]"
exit $ksft_skip
......
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