diff options
author | Zhangjin Wu <falcon@tinylab.org> | 2023-07-08 02:38:57 +0800 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2023-08-23 04:38:02 +0200 |
commit | bbb14546bd22b1c41af7182d085abe89ae21eecd (patch) | |
tree | 9f31c6375dbde755fc739eef0bb4bd565c9f856d /tools/testing/selftests/nolibc | |
parent | b8b26108e4d5a0d004393e8a53d374b2b076ba20 (diff) |
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>
Diffstat (limited to 'tools/testing/selftests/nolibc')
-rw-r--r-- | tools/testing/selftests/nolibc/nolibc-test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index 55cc2296c292..bc2f40c9cee6 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -1064,6 +1064,9 @@ int prepare(void) } } + /* some tests rely on a writable /tmp */ + mkdir("/tmp", 0755); + return 0; } |