It seems that '\s' does not work with old version
of grep (2.6.3).

Therefore several testcases fail on some distributions
using this version. For example - RHEL5-based.

Signed-off-by: Stanislav Kholmanskikh <[email protected]>
---
 .../cpuset_memory_spread_testset.sh                |    6 +++---
 .../cpuset_syscall_test/cpuset_syscall_testset.sh  |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
 
b/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
index b8a434f..ae1bc09 100755
--- 
a/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
+++ 
b/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh
@@ -61,7 +61,7 @@ set_memsinfo_val()
        local nl='
 '
        # clearing existent value (if present)
-       memsinfo=`echo "$memsinfo" | sed -r "/^\_$1\:\s/d"`
+       memsinfo=`echo "$memsinfo" | sed -r "/^\_$1\: /d"`
 
        if [ -z "$memsinfo" ]; then
                memsinfo="_$1: $2"
@@ -74,8 +74,8 @@ set_memsinfo_val()
 get_memsinfo_val()
 {
        local value=
-       value=`echo "$memsinfo" | grep -e "^\_$1\:\s"`
-       value=`echo "$value" | sed -r "s/^.*\:\s(.*)$/\1/"`
+       value=`echo "$memsinfo" | grep -e "^\_$1\: "`
+       value=`echo "$value" | sed -r "s/^.*\: (.*)$/\1/"`
        echo "$value"
 }
 
diff --git 
a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh
 
b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh
index 95196b7..587e912 100755
--- 
a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh
+++ 
b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh
@@ -231,7 +231,7 @@ test10()
                        awk '{print $2}')
        allowed_list="$(echo $allowed_list | sed -e s/bind://)"
 
-       task_policy=$(cat $TEST_PROCNUMA | grep -e "\s\+stack\s\+anon" | \
+       task_policy=$(cat $TEST_PROCNUMA | grep -e "  *stack  *anon" | \
                        awk '{print $2}')
 
        test "$allowed_list" = "$task_policy"
-- 
1.7.1


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to