Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <zhenzhang.zhang@huawei.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>

authored by

Zhang Zhen and committed by
Shuah Khan
d0bd7f2a 78000efe

+6 -1
+6 -1
tools/testing/selftests/mount/Makefile
··· 9 9 include ../lib.mk 10 10 11 11 TEST_PROGS := unprivileged-remount-test 12 - override RUN_TESTS := if [ -f /proc/self/uid_map ] ; then ./unprivileged-remount-test ; fi 12 + override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \ 13 + then \ 14 + ./unprivileged-remount-test ; \ 15 + else \ 16 + echo "WARN: No /proc/self/uid_map exist, test skipped." ; \ 17 + fi 13 18 override EMIT_TESTS := echo "$(RUN_TESTS)" 14 19 15 20 clean: