Skip to contentSkip to conversation

Fix bug of add_key01

PATCH In review Bian Naimeng 2 participants 2 messages Dec 28, 2010 – Jan 2, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix bug of add_key01

Never pass TPASS to tst_brkm, tst_brkm will set TBROK to T_exitval, then cause test fail.

---
 testcases/kernel/syscalls/add_key/add_key01.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/add_key/add_key01.c +1 -2
index ffa2f68..3786c9a 100644
@@ -127,8 +127,7 @@ int main(int ac, char **av) {
 					NULL, 0,
 					KEY_SPEC_THREAD_KEYRING));
 			if (TEST_RETURN != -1) {
-				tst_brkm(TPASS, cleanup,
-				    "add_key call succeeded");
+				tst_resm(TPASS, "add_key call succeeded");
 			} else {
 				tst_resm(TFAIL|TTERRNO, "%s failed", TCID);
 			}
Signature · 20 lines
1.7.0.4




-- 
Regards
Bian Naimeng


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 2 lines · Bian Naimeng

Never pass TPASS to tst_brkm, tst_brkm will set TBROK to T_exitval, then cause test fail.

I just simplified the testcase instead because IIRC the original version did the wrong thing and tst_resm + called cleanup immediately (or maybe I just got it backwards, but I hate the looping garbage ... so bye bye loop logic!). Again, good catch though.
Thanks!
-Garrett
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list