From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: Shi Weihua <shiwh@cn.fujitsu.com>
Cc: ltp-list <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH] cpuset_syscall_test: delete '0x' from hex string
Date: Wed, 13 Jan 2010 19:49:27 +0530 [thread overview]
Message-ID: <1263392367.5591.29.camel@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <4B4B0575.1090501@cn.fujitsu.com>
On Mon, 2010-01-11 at 19:03 +0800, Shi Weihua wrote:
> By the latest ltp version, the following fail message outputted on my x86_64 box.
> ------------
> TEST 5: CPUSET CONTROLLER TESTING
> TEST STARTED: Please avoid using system while this test executes
> ...
> cpuset05 8 TFAIL : Result(/proc/<pid>/status) = "", expect = "0")
> cpuset05 9 TFAIL : Result(/proc/<pid>/status) = "", expect = "1")
> cpuset05 10 TFAIL : Result(/proc/<pid>/status) = "", expect = "default")
> ------------
>
> The reason is:
> 1, '0x' wasn't deleted from a hex string's head.
> e.g. 7f343c900000 is expected ,but 0x7f343c900000 outputted.
> 2, a wrong '\b' was used in a grep command.
>
> This patch fix the upper problem. Now the message is:
> ------------
> cpuset05 7 TPASS : Cpuset vs systemcall test succeeded.
> cpuset05 8 TPASS : Cpuset vs systemcall test succeeded.
> cpuset05 9 TPASS : Cpuset vs systemcall test succeeded.
> cpuset05 10 TPASS : Cpuset vs systemcall test succeeded.
> ------------
>
> Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>
Thanks.
Regards--
Subrata
> ---
> diff -urpN ltp-full-20091231.orig/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh ltp-full-20091231/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh
> --- ltp-full-20091231.orig/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh 2009-06-23 10:09:11.000000000 -0400
> +++ ltp-full-20091231/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh 2010-01-11 18:42:59.000000000 -0500
> @@ -178,7 +178,8 @@ test7()
> {
> do_syscall_test 0 0 --mbind=1 0 || return 1
> memory_addr="$(cat $TEST_OUTPUT)"
> - allowed_list=$(cat $TEST_PROCNUMA | grep "\b$memory_addr" | \
> + memory_addr=${memory_addr##*0x}
> + allowed_list=$(cat $TEST_PROCNUMA | grep "$memory_addr" | \
> awk '{print $2}')
> allowed_list="$(echo $allowed_list | sed -e s/bind://)"
> test "$allowed_list" = "0" || return 1
> @@ -193,7 +194,8 @@ test8()
> {
> do_syscall_test 0 0-1 --mbind=1 0 || return 1
> memory_addr="$(cat $TEST_OUTPUT)"
> - allowed_list=$(cat $TEST_PROCNUMA | grep "\b$memory_addr" | \
> + memory_addr=${memory_addr##*0x}
> + allowed_list=$(cat $TEST_PROCNUMA | grep "$memory_addr" | \
> awk '{print $2}')
> allowed_list="$(echo $allowed_list | sed -e s/bind://)"
> test "$allowed_list" = "0"
> @@ -208,7 +210,8 @@ test9()
> {
> do_syscall_test 0 0-1 --mbind=6 0 || return 1
> memory_addr="$(cat $TEST_OUTPUT)"
> - allowed_list=$(cat $TEST_PROCNUMA | grep "\b$memory_addr" | \
> + memory_addr=${memory_addr##*0x}
> + allowed_list=$(cat $TEST_PROCNUMA | grep "$memory_addr" | \
> awk '{print $2}')
> allowed_list="$(echo $allowed_list | sed -e s/bind://)"
> test "$allowed_list" = "1"
> @@ -223,7 +226,8 @@ test10()
> {
> do_syscall_test 0 0 --mbind=6 1 || return 1
> memory_addr="$(cat $TEST_OUTPUT)"
> - allowed_list=$(cat $TEST_PROCNUMA | grep "\b$memory_addr" | \
> + memory_addr=${memory_addr##*0x}
> + allowed_list=$(cat $TEST_PROCNUMA | grep "$memory_addr" | \
> awk '{print $2}')
> allowed_list="$(echo $allowed_list | sed -e s/bind://)"
> test "$allowed_list" = "default"
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2010-01-13 14:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 11:03 [LTP] [PATCH] cpuset_syscall_test: delete '0x' from hex string Shi Weihua
2010-01-13 14:19 ` Subrata Modak [this message]
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=1263392367.5591.29.camel@subratamodak.linux.ibm.com \
--to=subrata@linux.vnet.ibm.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=shiwh@cn.fujitsu.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox