summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/ir/ir_loopback.sh
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-09 09:19:31 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-09 09:19:31 -0800
commita448c643bc49f14bb3aae68ee7085b4c7f6207d8 (patch)
tree83aefc01fbb95e5f6edfb9c3f7444cd37c13bb72 /tools/testing/selftests/ir/ir_loopback.sh
parent2bb995405fe52dd893db57456556e8dc4fce35a7 (diff)
parent0e27ded1159f62ab1a4e723796246bd5b1793b93 (diff)
Merge tag 'linux-kselftest-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kselftest update fromShuah Khan: - ir test compile warnings fixes - seccomp test fixes and improvements from Tycho Andersen and Kees Cook - ftrace fixes to non-POSIX-compliant constructs in colored output code and handling absence of tput from Juerg Haefliger * tag 'linux-kselftest-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/ftrace: Handle the absence of tput selftests/ftrace: Replace \e with \033 selftests/ftrace: Replace echo -e with printf selftests: ir: skip when non-root user runs the test selftests: ir: skip when lirc device doesn't exist. selftests: ir: fix warning: "%s" directive output may be truncated ’ directive output may be truncated selftests/seccomp: Actually sleep for 1/10th second selftests/harness: Update named initializer syntax selftests: unshare userns in seccomp pidns testcases selftests: set NO_NEW_PRIVS bit in seccomp user tests selftests: skip seccomp get_metadata test if not real root selftest: include stdio.h in kselftest.h selftests: fix typo in seccomp_bpf.c selftests: don't kill child immediately in get_metadata() test
Diffstat (limited to 'tools/testing/selftests/ir/ir_loopback.sh')
-rwxr-xr-xtools/testing/selftests/ir/ir_loopback.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/ir/ir_loopback.sh b/tools/testing/selftests/ir/ir_loopback.sh
index 0a0b8dfa39be..b90dc9939f45 100755
--- a/tools/testing/selftests/ir/ir_loopback.sh
+++ b/tools/testing/selftests/ir/ir_loopback.sh
@@ -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