Skip to content

Commit

Permalink
selftests/mount: output WARN messages when mount test skipped
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhang Zhen authored and Shuah Khan committed May 26, 2015
1 parent 78000ef commit d0bd7f2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/testing/selftests/mount/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d0bd7f2

Please sign in to comment.