Fix memcg test scripts
PATCH 1/1 Fix memcg test scripts
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.
---
testcases/kernel/controllers/memcg/functional/memcg_function_test.sh +1 -2
@@ -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....";
testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh +1 -2
@@ -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
testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh +1 -2
@@ -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....";
------------------------------------------------------------------------------
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
Quoted 47 lines · Sachin Sant
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.shb/testcases/kernel/controllers/memcg/functional/memcg_function_test.shtestcases/kernel/controllers/memcg/functional/memcg_function_test.sh 2010-03-02 12:23:33.000000000 +0530 renamed from testcases/kernel/controllers/memcg/functional/memcg_function_test.sh 2010-03-02 12:23:27.000000000 +0530 +0
-0@@ -30,8 +30,7 @@ export TCID="memcg_function_test"export TST_TOTAL=38
export TST_COUNT=0testcases/kernel/controllers/memcg/functional/memcg_function_test.sh 2010-03-02 12:23:33.000000000 +0530 renamed from testcases/kernel/controllers/memcg/functional/memcg_function_test.sh 2010-03-02 12:23:27.000000000 +0530 +1
-2-if [ ! "grep -w memory /proc/cgroups | cut -f4" == "1" ] -then +if [ "$(grep -w memory /proc/cgroups | cut -f4)" != "1" ]; thenecho "WARNING:";
echo "Either Kernel does not support for memory resource controller or feature not enabled";
echo "Skipping all memcgroup testcases....";
diff -Naurpa/testcases/kernel/controllers/memcg/regression/memcg_regression_test.shb/testcases/kernel/controllers/memcg/regression/memcg_regression_test.shtestcases/kernel/controllers/memcg/regression/memcg_regression_test.sh 2010-03-02 12:23:33.000000000 +0530 renamed from testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh 2010-03-02 12:23:27.000000000 +0530 +0
-0@@ -35,8 +35,7 @@ if [ "$(id -ru)" != 0 ]; thenexit 0
fitestcases/kernel/controllers/memcg/regression/memcg_regression_test.sh 2010-03-02 12:23:33.000000000 +0530 renamed from testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh 2010-03-02 12:23:27.000000000 +0530 +1
-2-if [ "$(grep -w memory /proc/cgroups | cut -f4)" != "1" ] -then +if [ "$(grep -w memory /proc/cgroups | cut -f4)" != "1" ]; thentst_resm TCONF "Either memory resource controller kernel support absent"
tst_resm TCONF "or feature is not enabled; skipping all memcgroup testcases."
exit 0
diff -Naurpa/testcases/kernel/controllers/memcg/stress/memcg_stress_test.shb/testcases/kernel/controllers/memcg/stress/memcg_stress_test.shtestcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2010-03-02 12:23:33.000000000 +0530 renamed from testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2010-03-02 12:23:27.000000000 +0530 +0
-0@@ -30,8 +30,7 @@ export TCID="memcg_stress_test"export TST_TOTAL=2
export TST_COUNT=0testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2010-03-02 12:23:33.000000000 +0530 renamed from testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh 2010-03-02 12:23:27.000000000 +0530 +1
-2-if [ ! "grep -w memory /proc/cgroups | cut -f4" == "1" ] -then +if [ "$(grep -w memory /proc/cgroups | cut -f4)" != "1" ]; then
Quoted 3 lines
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