selftests/nolibc: add chmod_argv0 test
authorZhangjin Wu <falcon@tinylab.org>
Fri, 7 Jul 2023 18:46:20 +0000 (02:46 +0800)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Aug 2023 02:40:15 +0000 (04:40 +0200)
commit148e9718e2a288ef4fee16089cb9555414052fbb
treec409781a51f315cd33eb13d361bf7aa5e6889b1e
parent135b622e4855981cad487aead7e6992358a0d25c
selftests/nolibc: add chmod_argv0 test

argv0 is readable and chmodable, let's use it for chmod test, but a safe
umask should be used, the readable and executable modes should be
reserved.

Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
tools/testing/selftests/nolibc/nolibc-test.c