]> git.karo-electronics.de Git - linux-beck.git/commitdiff
selftests/mount: output WARN messages when mount test skipped
authorZhang Zhen <zhenzhang.zhang@huawei.com>
Fri, 3 Apr 2015 01:39:36 +0000 (09:39 +0800)
committerShuah Khan <shuahkh@osg.samsung.com>
Tue, 26 May 2015 21:58:06 +0000 (15:58 -0600)
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 <zhenzhang.zhang@huawei.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/mount/Makefile

index 95580a97326e166ce2cd9f267055bbc2cdbc2355..5e35c9c50b72bbebcfb9393928bc10a03fb44479 100644 (file)
@@ -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: