selftests/nolibc: prepare /tmp for tests that need to write
authorZhangjin Wu <falcon@tinylab.org>
Fri, 7 Jul 2023 18:38:57 +0000 (02:38 +0800)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Aug 2023 02:38:02 +0000 (04:38 +0200)
commitbbb14546bd22b1c41af7182d085abe89ae21eecd
tree9f31c6375dbde755fc739eef0bb4bd565c9f856d
parentb8b26108e4d5a0d004393e8a53d374b2b076ba20
selftests/nolibc: prepare /tmp for tests that need to write

create a /tmp directory. If it succeeds, the directory is writable,
which is normally the case when booted from an initramfs anyway.

This will be used instead of procfs for some tests.

Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
Link: https://lore.kernel.org/lkml/20230710050600.9697-1-falcon@tinylab.org/
[wt: removed the unneeded mount() call]
Signed-off-by: Willy Tarreau <w@1wt.eu>
tools/testing/selftests/nolibc/nolibc-test.c