when executing mem/mbind01 testcase under some systems, it returns
ENOSYS error, indicating that mbind syscall is not implemented on this
system. This behavior is allowed and should not return error.

Signed-off-by: Caspar Zhang <[email protected]>
---
 testcases/kernel/syscalls/mbind/mbind02.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/mbind/mbind02.c b/testcases/kernel/syscalls/mbind/mbind02.c
index 78d4a11..c829558 100644
--- a/testcases/kernel/syscalls/mbind/mbind02.c
+++ b/testcases/kernel/syscalls/mbind/mbind02.c
@@ -43,6 +43,7 @@ int TST_TOTAL = 1;
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
+#include <errno.h>
 
 static unsigned long pagesize;
 static int opt_node;
@@ -90,8 +91,13 @@ int main(int argc, char** argv)
 		/* first mbind */
 		err = mbind(addr+pagesize, pagesize, MPOL_BIND, nmask->maskp,
 			nmask->size, MPOL_MF_MOVE_ALL);
-		if (err != 0)
-			tst_brkm(TBROK|TERRNO, NULL, "mbind1");
+		if (err != 0) {
+			if (errno != ENOSYS)
+				tst_brkm(TBROK|TERRNO, NULL, "mbind1");
+			else
+				tst_brkm(TCONF, NULL,
+					"mbind syscall not implemented on this system.");
+		}
 
 		/* second mbind */
 		err = mbind(addr, pagesize*3, MPOL_DEFAULT, NULL, 0, 0);
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to