selftests/nolibc: stat_timestamps: remove procfs dependency
authorZhangjin Wu <falcon@tinylab.org>
Fri, 7 Jul 2023 18:43:44 +0000 (02:43 +0800)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Aug 2023 02:38:02 +0000 (04:38 +0200)
commitf576d3c075dbc469480e737a97916be3c8f1a723
tree236a1f3aebd0a99897317b066b94690e9fd4c508
parent38fc0a3553ced0158d97047f5fb3b73898226a3c
selftests/nolibc: stat_timestamps: remove procfs dependency

'/proc/self/' is a good path which doesn't have stale time info but it
is only available for CONFIG_PROC_FS=y.

When CONFIG_PROC_FS=n, use argv0 instead of '/proc/self', use '/' for the
worst case.

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