Skip to content

Commit d0bd7f2

Browse files
Zhang ZhenShuah Khan
authored andcommitted
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 <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 78000ef commit d0bd7f2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/testing/selftests/mount/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ unprivileged-remount-test: unprivileged-remount-test.c
99
include ../lib.mk
1010

1111
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
1318
override EMIT_TESTS := echo "$(RUN_TESTS)"
1419

1520
clean:

0 commit comments

Comments
 (0)