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 <[email protected]>
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
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list