All of lore.kernel.org
 help / color / mirror / Atom feed
From: liubo <liubo-fnst@cn.fujitsu.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH] : fix memcg_function_test's bug
Date: Fri, 09 Oct 2009 15:10:12 +0800	[thread overview]
Message-ID: <4ACEE1D4.5000202@cn.fujitsu.com> (raw)

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

             reply	other threads:[~2009-10-09  7:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09  7:10 liubo [this message]
2009-10-09  7:14 ` [LTP] [PATCH] : fix memcg_function_test's bug Garrett Cooper
2009-10-13 14:43 ` Subrata Modak
2009-10-13 14:44 ` Subrata Modak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ACEE1D4.5000202@cn.fujitsu.com \
    --to=liubo-fnst@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.