[LTP] [PATCH 6/11] mmap/mmap12: Testcase failed when no root user run it
Cui Bixuan
cuibixuan@huawei.com
Wed Oct 28 04:11:42 CET 2015
Add tst_require_root() to testcase for open /proc/self/pagemap file.
Signed-off-by: Cui Bixuan <cuibixuan@huawei.com>
---
testcases/kernel/syscalls/mmap/mmap12.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/testcases/kernel/syscalls/mmap/mmap12.c b/testcases/kernel/syscalls/mmap/mmap12.c
index ba8c646..7484601 100644
--- a/testcases/kernel/syscalls/mmap/mmap12.c
+++ b/testcases/kernel/syscalls/mmap/mmap12.c
@@ -143,6 +143,8 @@ static void setup(void)
{
tst_sig(FORK, DEF_HANDLER, cleanup);
+ tst_require_root();
+
if ((tst_kvercmp(2, 6, 25)) < 0)
tst_brkm(TCONF, NULL,
"This test can only run on kernels that are 2.6.25 and "
--
1.6.0.2
More information about the Ltp
mailing list