On Tue, Mar 2, 2010 at 1:21 AM, Sachin Sant <[email protected]> wrote: > Inspite of memcg kernel support being available, memcg_[functional|regression > |stress] test script fails to execute with message > > "Either Kernel does not support for memory resource controller or feature not > enabled" > "Skipping all memcgroup testcases...." > > Fix the scripts to use proper if []; then .. fi statements. > > Signed-off-by : Sachin Sant <[email protected]> > --- > > diff -Naurp > a/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh > b/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh > --- a/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh > 2010-03-02 12:23:27.000000000 +0530 > +++ b/testcases/kernel/controllers/memcg/functional/memcg_function_test.sh > 2010-03-02 12:23:33.000000000 +0530 > @@ -30,8 +30,7 @@ export TCID="memcg_function_test" > export TST_TOTAL=38 > export TST_COUNT=0 > > -if [ ! "grep -w memory /proc/cgroups | cut -f4" == "1" ] > -then > +if [ "$(grep -w memory /proc/cgroups | cut -f4)" != "1" ]; then > echo "WARNING:"; > echo "Either Kernel does not support for memory resource controller > or feature not enabled"; > echo "Skipping all memcgroup testcases...."; > diff -Naurp > a/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh > b/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh > --- a/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh > 2010-03-02 12:23:27.000000000 +0530 > +++ b/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh > 2010-03-02 12:23:33.000000000 +0530 > @@ -35,8 +35,7 @@ if [ "$(id -ru)" != 0 ]; then > exit 0 > fi > > -if [ "$(grep -w memory /proc/cgroups | cut -f4)" != "1" ] > -then > +if [ "$(grep -w memory /proc/cgroups | cut -f4)" != "1" ]; then > tst_resm TCONF "Either memory resource controller kernel support > absent" > tst_resm TCONF "or feature is not enabled; skipping all memcgroup > testcases." > exit 0 > diff -Naurp a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh > b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh > --- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh > 2010-03-02 12:23:27.000000000 +0530 > +++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh > 2010-03-02 12:23:33.000000000 +0530 > @@ -30,8 +30,7 @@ export TCID="memcg_stress_test" > export TST_TOTAL=2 > export TST_COUNT=0 > > -if [ ! "grep -w memory /proc/cgroups | cut -f4" == "1" ] > -then > +if [ "$(grep -w memory /proc/cgroups | cut -f4)" != "1" ]; then > echo "WARNING:"; > echo "Either Kernel does not support for memory resource controller > or feature not enabled"; > echo "Skipping all memcgroup testcases....";
Good catch -- thanks! -Garrett ------------------------------------------------------------------------------ Download Intel® 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
