On Wed, Mar 10, 2010 at 8:22 PM, Yuki Yao <[email protected]> wrote:
> Hi,
>
> I found following problem about "memcg_control" test.
> ---------
> /opt/ltp/testcases/bin/memcg_control_test.sh: line 30: [: : integer
> expression expected
> ----------
>
> This happens because of following process.
> [ memcg_control_test.sh: line 30 ]
> ---------
> if [ "$(grep -w memory /proc/cgroups | cut -f4)" -ne "1" ]; then
>        echo "WARNING:"
>        echo "Either kernel does not support memory resource controller or
> feature not ena bled"
>        echo "Skipping all memcg_control testcases...."
>        exit 0
> fi
> ---------
>
> "$(grep -w memory /proc/cgroups | cut -f4)" can't comparable with "1"
> if "$(grep -w memory /proc/cgroups | cut -f4)" = nothing.
>
> How about fixing like the other "memcg" tests?
>
> Signed-off-by: Yuki Yao<[email protected]>
>
> Index: ./testcases/kernel/controllers/memcg/control/memcg_control_test.sh
> ==============================
> ---
> /home/LTP/ltp-dev-20100311/testcases/kernel/controllers/memcg/control/memcg_
> control_test.sh.org     2010-03-11 11:31:07.000000000 +0900
> +++
> /home/LTP/ltp-dev-20100311/testcases/kernel/controllers/memcg/control/memcg_
> control_test.sh 2010-03-11 11:32:21.000000000 +0900
> @@ -27,7 +27,7 @@
>  ##
> ##
>
> ############################################################################
> ####
>
> -if [ "$(grep -w memory /proc/cgroups | cut -f4)" -ne "1" ]; then
> +if [ "x$(grep -w memory /proc/cgroups | cut -f4)" != "x1" ]; then
>        echo "WARNING:"
>        echo "Either kernel does not support memory resource controller or
> feature not enabled"
>        echo "Skipping all memcg_control testcases...."

Ack, I knew I missed a spot. Committed...
Thanks,
-Garrett

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to