Skip to contentSkip to conversation

Fix the failure of get_mempolicy01 test case

PATCH In review Wei Yongjun 2 participants 2 messages Jul 21, 2009 – Jul 30, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix the failure of get_mempolicy01 test case

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.

testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c +1 -1
index 2201bf4..aa0b14b 100644
@@ -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

#1 lore raw
Quoted 5 lines · Wei Yongjun

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.

Thanks.

Regards--
Subrata

Quoted 20 lines
testcases/kernel/syscalls/get_mempolicy/get_mempolicy01.c +1 -2
index 2201bf4..aa0b14b 100644
@@ -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

Quoted 8 lines

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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list