[LTP] [PATCH 7/11] mq_open/mq_open01: Testcase failed when no root user run it

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


Add tst_require_root() to testcase for mq_open().

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

diff --git a/testcases/kernel/syscalls/mq_open/mq_open01.c b/testcases/kernel/syscalls/mq_open/mq_open01.c
index 529dd7a..f53b4bc 100644
--- a/testcases/kernel/syscalls/mq_open/mq_open01.c
+++ b/testcases/kernel/syscalls/mq_open/mq_open01.c
@@ -112,6 +112,8 @@ void cleanup(void)
 /******************************************************************************/
 void setup(void)
 {
+	tst_require_root();
+
 	/* Capture signals if any */
 	/* Create temporary directories */
 	TEST_PAUSE;
-- 
1.6.0.2



More information about the Ltp mailing list