Test case get_mempolicy01 failure because of the the nodemask
is not used when from_node is NONE type. If the from_node is
NONE, nodemask_equal() is not need.

Signed-off-by: Wei Yongjun <[email protected]>

diff --git a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c 
b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
index 2201bf4..aa0b14b 100644
--- a/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
+++ b/testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c
@@ -337,7 +337,7 @@ static int do_test(struct test_case *tc)
         // When policy equals MPOL_DEFAULT, then get_mempolicy not return node
         if (tc->policy == MPOL_DEFAULT)
                 nodemask_zero(&nodemask);
-        cmp_ok = tc->policy == policy && 
nodemask_equal(&nodemask,&getnodemask);
+        cmp_ok = tc->policy == policy && (tc->from_node == NONE || 
nodemask_equal(&nodemask,&getnodemask));
         if (opt_debug) {
                 nodemask_dump("nodemask Expect:", &nodemask);
                 nodemask_dump("nodemask Result:", &getnodemask);




------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to