selftests/nolibc: export argv0 for some tests
authorZhangjin Wu <falcon@tinylab.org>
Fri, 7 Jul 2023 15:01:09 +0000 (23:01 +0800)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Aug 2023 02:38:02 +0000 (04:38 +0200)
commit938b5b983330a55af8e31eabf329db7dbc7a5038
tree43b70a8c179f9de2a116e1d4d54d5470edd6d2a9
parent4201cfce15fe35d9d90ae870aba12eb84c0452ab
selftests/nolibc: export argv0 for some tests

argv0 is the path to nolibc-test program itself, which is a very good
always existing readable file for some tests, let's export it.

Note, the path may be absolute or relative, please make sure the tests
work with both of them. If it is relative, we must make sure the current
path is the one specified by the PWD environment variable.

Suggested-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/lkml/ZKKbS3cwKcHgnGwu@1wt.eu/
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
tools/testing/selftests/nolibc/nolibc-test.c