linux/tools/testing/selftests/nolibc
Zhangjin Wu b8b26108e4 selftests/nolibc: fix up failures when CONFIG_PROC_FS=n
For CONFIG_PROC_FS=n, the /proc is not mountable, but the /proc
directory has been created in the prepare() stage whenever /proc is
there or not.

so, the checking of /proc in the run_syscall() stage will be always true
and at last it will fail all of the procfs dependent test cases, which
deviates from the 'cond' check design of the EXPECT_xx macros, without
procfs, these test cases should be skipped instead of failed.

To solve this issue, one method is checking /proc/self instead of /proc,
another method is removing the /proc directory completely for
CONFIG_PROC_FS=n, we apply the second method to avoid misleading the
users.

Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2023-08-23 04:38:02 +02:00
..
.gitignore tools/nolibc: add libc-test binary 2023-06-09 11:33:05 -07:00
Makefile selftests/nolibc: add run-libc-test target 2023-08-23 04:38:02 +02:00
nolibc-test.c selftests/nolibc: fix up failures when CONFIG_PROC_FS=n 2023-08-23 04:38:02 +02:00