diff options
author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2025-07-04 16:43:12 +0300 |
---|---|---|
committer | Thomas Weißschuh <linux@weissschuh.net> | 2025-07-06 12:02:39 +0300 |
commit | 2b1ed5f7f8ab82597abfff56a39f056f8592df43 (patch) | |
tree | 89d100b9a728fb733f5327446b272d49cc904e9c /tools | |
parent | 7c02bc4088af55195f16bfa565127b4864c7e248 (diff) | |
download | linux-2b1ed5f7f8ab82597abfff56a39f056f8592df43.tar.xz |
selftests/nolibc: create /dev/full when running as PID 1
An upcoming testcase will use /dev/full.
Make sure it is always present.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20250704-nolibc-printf-error-v1-1-74b7a092433b@linutronix.de
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/nolibc/nolibc-test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index 315229233930..ef80861105f5 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -1778,12 +1778,14 @@ int prepare(void) if (stat("/dev/.", &stat_buf) == 0 || mkdir("/dev", 0755) == 0) { if (stat("/dev/console", &stat_buf) != 0 || stat("/dev/null", &stat_buf) != 0 || - stat("/dev/zero", &stat_buf) != 0) { + stat("/dev/zero", &stat_buf) != 0 || + stat("/dev/full", &stat_buf) != 0) { /* try devtmpfs first, otherwise fall back to manual creation */ if (mount("/dev", "/dev", "devtmpfs", 0, 0) != 0) { mknod("/dev/console", 0600 | S_IFCHR, makedev(5, 1)); mknod("/dev/null", 0666 | S_IFCHR, makedev(1, 3)); mknod("/dev/zero", 0666 | S_IFCHR, makedev(1, 5)); + mknod("/dev/full", 0666 | S_IFCHR, makedev(1, 7)); } } } |