[LTP] [PATCH 4/11] execve/execve03: Testcase failed when no root user run it
Cui Bixuan
cuibixuan@huawei.com
Wed Oct 28 04:11:40 CET 2015
Add tst_require_root() to testcase for setgid().
Signed-off-by: Cui Bixuan <cuibixuan@huawei.com>
---
testcases/kernel/syscalls/execve/execve03.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/testcases/kernel/syscalls/execve/execve03.c b/testcases/kernel/syscalls/execve/execve03.c
index a3e589e..15b575d 100644
--- a/testcases/kernel/syscalls/execve/execve03.c
+++ b/testcases/kernel/syscalls/execve/execve03.c
@@ -166,6 +166,8 @@ void setup(void)
char *cwdname = NULL;
int fd;
+ tst_require_root();
+
umask(0);
tst_sig(NOFORK, DEF_HANDLER, cleanup);
--
1.6.0.2
More information about the Ltp
mailing list