All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] : fix memcg_function_test's bug
@ 2009-10-09  7:10 liubo
  2009-10-09  7:14 ` Garrett Cooper
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: liubo @ 2009-10-09  7:10 UTC (permalink / raw)
  To: ltp-list

testcase_25() uses a wrong "$?" value ,
Now use "ret" to record the real "$?" 
value for test .


Signed-off-by: Liu Bo <liubo-fnst@cn.fujitsu.com>

---
diff --git a/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh b/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
index ea4c8a2..0f11835 100755
--- a/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
+++ b/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
@@ -398,11 +398,12 @@ testcase_24()
 testcase_25()
 {
 	echo -1 > memory.limit_in_bytes 2> /dev/null
+	ret=$?
 	tst_kvercmp 2 6 31
 	if [ $? -eq 0 ]; then
-		result $(( !($? != 0) ))  "return value is $?"
+		result $(( !($ret != 0) ))  "return value is $ret"
        else
-		result $(( !($? == 0) ))  "return value is $?"
+		result $(( !($ret == 0) ))  "return value is $ret"
 	fi
 }
 

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-13 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-09  7:10 [LTP] [PATCH] : fix memcg_function_test's bug liubo
2009-10-09  7:14 ` Garrett Cooper
2009-10-13 14:43 ` Subrata Modak
2009-10-13 14:44 ` Subrata Modak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.