diff mbox series

[v2,14/15] selftests/nolibc: add chmod_tmpfile test

Message ID 02a08c64cd16ea03101e271527c5573453e9195f.1688078605.git.falcon@tinylab.org (mailing list archive)
State New
Headers show
Series allow run with minimal kernel config | expand

Commit Message

Zhangjin Wu June 30, 2023, 12:01 a.m. UTC
allow test chmod with tmpfs even when procfs is not there.

Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
---
 tools/testing/selftests/nolibc/nolibc-test.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index 2e9eaa7efa6e..0ca7d011765a 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -719,6 +719,7 @@  int run_syscall(int min, int max)
 		CASE_TEST(chdir_blah);        EXPECT_SYSER(1, chdir("/blah"), -1, ENOENT); break;
 		CASE_TEST(chmod_net);         EXPECT_SYSZR(proc, chmod("/proc/self/net", 0555)); break;
 		CASE_TEST(chmod_self);        EXPECT_SYSER(proc, chmod("/proc/self", 0555), -1, EPERM); break;
+		CASE_TEST(chmod_tmpfile);     EXPECT_SYSZR(has_tmpfile, chmod(tmpfile, 0555)); break;
 		CASE_TEST(chown_self);        EXPECT_SYSER(proc, chown("/proc/self", 0, 0), -1, EPERM); break;
 		CASE_TEST(chroot_root);       EXPECT_SYSZR(euid0, chroot("/")); break;
 		CASE_TEST(chroot_blah);       EXPECT_SYSER(1, chroot("/proc/self/blah"), -1, ENOENT); break;