mirror of
https://github.com/torvalds/linux.git
synced 2024-12-06 11:01:43 +00:00
selftests/nolibc: chroot_exe: remove procfs dependency
Since argv0 also works for CONFIG_PROC_FS=n, let's use it instead of '/proc/self/exe'. Signed-off-by: Zhangjin Wu <falcon@tinylab.org> Signed-off-by: Willy Tarreau <w@1wt.eu>
This commit is contained in:
parent
f576d3c075
commit
135b622e48
@ -711,7 +711,7 @@ int run_syscall(int min, int max)
|
||||
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;
|
||||
CASE_TEST(chroot_exe); EXPECT_SYSER(proc, chroot("/proc/self/exe"), -1, ENOTDIR); break;
|
||||
CASE_TEST(chroot_exe); EXPECT_SYSER(1, chroot(argv0), -1, ENOTDIR); break;
|
||||
CASE_TEST(close_m1); EXPECT_SYSER(1, close(-1), -1, EBADF); break;
|
||||
CASE_TEST(close_dup); EXPECT_SYSZR(1, close(dup(0))); break;
|
||||
CASE_TEST(dup_0); tmp = dup(0); EXPECT_SYSNE(1, tmp, -1); close(tmp); break;
|
||||
|
Loading…
Reference in New Issue
Block a user