[LTP] [PATCH 11/11] unshare/unshare01: Testcase failed when no root user run it

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


Add tst_require_root() to testcase for unshare().

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

diff --git a/testcases/kernel/syscalls/unshare/unshare01.c b/testcases/kernel/syscalls/unshare/unshare01.c
index 17a5a5f..84d1892 100644
--- a/testcases/kernel/syscalls/unshare/unshare01.c
+++ b/testcases/kernel/syscalls/unshare/unshare01.c
@@ -144,6 +144,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