From d0bd7f2ac785468ee99e24a0e7b37420e5a242e8 Mon Sep 17 00:00:00 2001 From: Zhang Zhen Date: Fri, 3 Apr 2015 09:39:36 +0800 Subject: selftests/mount: output WARN messages when mount test skipped If /proc/self/uid_map doesn't exist, mount test case exits wthout any warning. Fix it to print a warning that the test is skipped because /proc/self/uid_map doesn't exist. Signed-off-by: Zhang Zhen Signed-off-by: Shuah Khan --- tools/testing/selftests/mount/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools/testing/selftests/mount/Makefile') diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile index 95580a97326e..5e35c9c50b72 100644 --- a/tools/testing/selftests/mount/Makefile +++ b/tools/testing/selftests/mount/Makefile @@ -9,7 +9,12 @@ unprivileged-remount-test: unprivileged-remount-test.c include ../lib.mk TEST_PROGS := unprivileged-remount-test -override RUN_TESTS := if [ -f /proc/self/uid_map ] ; then ./unprivileged-remount-test ; fi +override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \ + then \ + ./unprivileged-remount-test ; \ + else \ + echo "WARN: No /proc/self/uid_map exist, test skipped." ; \ + fi override EMIT_TESTS := echo "$(RUN_TESTS)" clean: -- cgit v1.2.3