diff options
| author | Zhangjin Wu <[email protected]> | 2023-07-08 02:38:57 +0800 |
|---|---|---|
| committer | Willy Tarreau <[email protected]> | 2023-08-23 04:38:02 +0200 |
| commit | bbb14546bd22b1c41af7182d085abe89ae21eecd (patch) | |
| tree | 9f31c6375dbde755fc739eef0bb4bd565c9f856d /tools/testing | |
| 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 <[email protected]>
Signed-off-by: Zhangjin Wu <[email protected]>
Link: https://lore.kernel.org/lkml/[email protected]/
[wt: removed the unneeded mount() call]
Signed-off-by: Willy Tarreau <[email protected]>
Diffstat (limited to 'tools/testing')
| -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; } |