> commit fe4599d210be37a7d1bb2d6a5523b9e29bbd87e1
> Author: Rishikesh K Rajak <[email protected]>
> Date: Mon Dec 28 15:11:54 2009 +0530
>
> Added check for regression and funcitonal memcg test
>
You should add your Signed-off-by.
> diff --git
> a/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
> b/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
> index 003af1c..303661c 100755
> --- a/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
> +++ b/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh
> @@ -28,8 +28,8 @@ export TCID="memcg_function_test"
> export TST_TOTAL=38
> export TST_COUNT=0
>
> -grep -w memory /proc/cgroups 2>&1 > /dev/null
> -if [ $? -ne 0 ]; then
> +if [ `grep -w memory /proc/cgroups | cut -f4` == 0 ]
What if memory cgroup is not compiled? So the correct check should be:
if [ ! "grep -w memory /proc/cgroups | cut -f4" == "1" ]
then
...
fi
> +then
> echo "WARNING:";
> echo "Kernel does not support for memory resource controller";
> echo "Skipping all memcgroup testcases....";
> diff --git
> a/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
> b/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
> index 6bf7c88..0bc3d75 100755
> --- a/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
> +++ b/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
> @@ -33,6 +33,15 @@ if [ "$USER" != root ]; then
> exit 0
> fi
>
> +if [ `grep -w memory /proc/cgroups | cut -f4` == 0 ]
> +then
> + echo "WARNING:";
> + echo "Kernel does not support for memory resource controller";
> + echo "Skipping all memcgroup testcases....";
> + exit 0
> +fi
ditto
> +
> +
> tst_kvercmp 2 6 30
> if [ $? -eq 0 ]; then
> tst_brkm TBROK ignored "Test should be run with kernel 2.6.30 or newer"
> diff --git a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> index 7244a16..c155bf1 100755
> --- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> +++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> @@ -28,14 +28,15 @@ export TCID="memcg_stress_test"
> export TST_TOTAL=2
> export TST_COUNT=0
>
> -grep -w memory /proc/cgroups 2>&1 > /dev/null
> -if [ $? -ne 0 ]; then
> - echo "WARNING:";
> - echo "Kernel does not support for memory resource controller";
> - echo "Skipping all memcgroup testcases....";
> - exit 0
> +if [ `grep -w memory /proc/cgroups | cut -f4` == 0 ]
> +then
> + echo "WARNING:";
> + echo "Kernel does not support for memory resource controller";
> + echo "Skipping all memcgroup testcases....";
> + exit 0
> fi
ditto
>
> +
> RUN_TIME=$(( 60 * 60 ))
>
> cleanup()
------------------------------------------------------------------------------
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