On Tue, 2009-12-01 at 23:35 +0100, Jiri Palecek wrote: 
> Hello,
> 
> this patch removes the use of bash arrays from memcg_stress_test.sh, thus 
> making the script more POSIX friendly. I changed the array into a series of 
> variables, read and written using eval.
> 
> Regards
>     Jiri Palecek
> 
> Signed-off-by: Jiri Palecek <[email protected]>

Thanks.

Regards--
Subrata

> ---
>  .../controllers/memcg/stress/memcg_stress_test.sh  |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 
> b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> index 6c9cd75..7244a16 100755
> --- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> +++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> @@ -70,22 +70,22 @@ run_stress()
>       do
>               mkdir /dev/memcg/$i 2> /dev/null
>               ./memcg_process_stress $2 $3 &
> -             pid[$i]=$!
> +             eval pid$i=$!
> 
> -             echo ${pid[$i]} > /dev/memcg/$i/tasks
> +             eval echo \$pid$i > /dev/memcg/$i/tasks
>       done
> 
>       for i in $(seq 0 $(($1-1)))
>       do
> -             /bin/kill -s SIGUSR1 ${pid[$i]} 2> /dev/null
> +             eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
>       done
> 
>       sleep $4
> 
>       for i in $(seq 0 $(($1-1)))
>       do
> -             /bin/kill -s SIGINT ${pid[$i]} 2> /dev/null
> -             wait ${pid[$i]}
> +             eval /bin/kill -s SIGINT \$pid$i 2> /dev/null
> +             eval wait \$pid$i
> 
>               rmdir /dev/memcg/$i 2> /dev/null
>       done


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to