diff options
| author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2025-04-28 14:40:08 +0200 |
|---|---|---|
| committer | Thomas Weißschuh <linux@weissschuh.net> | 2025-05-21 15:32:06 +0200 |
| commit | 1e10b8534f5af42b7da528c254595f2a0cf4997d (patch) | |
| tree | bbf80d3036776e9ec912b063c2f37f95aec1b535 /tools/testing/selftests/nolibc/nolibc-test.c | |
| parent | bf5e8a78beded3503bbcfe86b3094a42ce492556 (diff) | |
tools/nolibc: add support for access() and faccessat()
This is used in various selftests and will be handy when integrating
those with nolibc.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-7-3c043eeab06c@linutronix.de
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'tools/testing/selftests/nolibc/nolibc-test.c')
| -rw-r--r-- | tools/testing/selftests/nolibc/nolibc-test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index 14a27bc6c83e..10db118b8b11 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -1112,6 +1112,8 @@ int run_syscall(int min, int max) * test numbers. */ switch (test + __LINE__ + 1) { + CASE_TEST(access); EXPECT_SYSZR(proc, access("/proc/self", R_OK)); break; + CASE_TEST(access_bad); EXPECT_SYSER(proc, access("/proc/self", W_OK), -1, EPERM); break; CASE_TEST(getpid); EXPECT_SYSNE(1, getpid(), -1); break; CASE_TEST(getppid); EXPECT_SYSNE(1, getppid(), -1); break; CASE_TEST(gettid); EXPECT_SYSNE(has_gettid, gettid(), -1); break; |