[LTP] [PATCH 2/11] capset/capset02: Testcase failed when no root user run it

Cui Bixuan cuibixuan@huawei.com
Wed Oct 28 04:11:38 CET 2015


Add tst_require_root() to testcase for seteuid().

Signed-off-by: Cui Bixuan <cuibixuan@huawei.com>
---
 testcases/kernel/syscalls/capset/capset02.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/testcases/kernel/syscalls/capset/capset02.c b/testcases/kernel/syscalls/capset/capset02.c
index 146755c..d08878e 100644
--- a/testcases/kernel/syscalls/capset/capset02.c
+++ b/testcases/kernel/syscalls/capset/capset02.c
@@ -174,6 +174,7 @@ int main(int ac, char **av)
 
 void setup(void)
 {
+	tst_require_root();
 
 	TEST_PAUSE;
 
-- 
1.6.0.2



More information about the Ltp mailing list