cgroup_fj: fixed exit codes in case of not supported tests
PATCH 1/1 cgroup_fj: fixed exit codes in case of not supported tests
Signed-off-by Cedric Hnyda <[email protected]>
Updated
--- .../controllers/cgroup_fj/cgroup_fj_function.sh | 12 +-- .../controllers/cgroup_fj/cgroup_fj_function2.sh | 2 +- .../controllers/cgroup_fj/cgroup_fj_stress.sh | 2 +- .../controllers/cgroup_fj/cgroup_fj_utility.sh | 103 +++++++++++---------- .../controllers/cgroup_fj/run_cgroup_test_fj.sh | 4 +- 5 files changed, 62 insertions(+), 61 deletions(-)
testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh +6 -6
@@ -38,7 +38,7 @@ release_agent_para_str=""; notify_on_release_str=""; release_agent_str=""; -expectted=1; +expected=1; # Create some processes and move them to cgroups pid=0;
@@ -127,7 +127,7 @@ export TMPFILE=$TESTROOT/tmp_tasks ########################## main ####################### if [ "$#" -ne "9" ]; then - echo "ERROR: Wrong inputed parameter..Exiting test"; + echo "ERROR: Wrong input parameters... Exiting test"; usage; exit -1; fi
@@ -210,17 +210,17 @@ esac # echo notify_on_release that analysed from parameter case $notify_on_release in "1"|"2"|"3") - expectted=1 + expected=1 ;; *) - expectted=0 + expected=0 ;; esac #if [ $notify_on_release -ne 0 ] && [ $notify_on_release -ne 1 ] && [ $notify_on_release -ne 2 ];then -# expectted=0 +# expected=0 #fi -do_echo 1 $expectted $notify_on_release_str /dev/cgroup/subgroup_1/notify_on_release; +do_echo 1 $expected $notify_on_release_str /dev/cgroup/subgroup_1/notify_on_release; # echo release_agent that analysed from parameter if [ $release_agent_echo -ne 1 ]; then
testcases/kernel/controllers/cgroup_fj/cgroup_fj_function2.sh +1 -1
@@ -45,7 +45,7 @@ usage() exit_parameter() { - echo "ERROR: Wrong inputed parameter..Exiting test" + echo "ERROR: Wrong input parametes... Exiting test" exit -1; }
testcases/kernel/controllers/cgroup_fj/cgroup_fj_stress.sh +1 -1
@@ -76,7 +76,7 @@ usage() exit_parameter() { - echo "ERROR: Wrong inputed parameter..Exiting test" + echo "ERROR: Wrong input parameters... Exiting test" exit -1; }
testcases/kernel/controllers/cgroup_fj/cgroup_fj_utility.sh +52 -51
288 lines not on this page · raw message
testcases/kernel/controllers/cgroup_fj/run_cgroup_test_fj.sh +2 -2
@@ -125,8 +125,8 @@ esac ret=$? if [ $ret -eq 0 ]; then tst_resm TPASS "case$i($CASETYPE$CASECMD) PASS" -elif [ $ret -ne 9 ]; then +elif [ $ret -ne 32 ]; then tst_resm TFAIL "case$i($CASETYPE $CASECMD) FAIL" fi -exit $ret; +tst_exit
Signature · 13 lines
2.1.4 ------------------------------------------------------------------------------ Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
testcases/kernel/controllers/cgroup_fj/run_cgroup_test_fj.sh esac · line 132
Quoted 11 lines
testcases/kernel/controllers/cgroup_fj/run_cgroup_test_fj.sh +2
-2@@ -125,8 +125,8 @@ esac ret=$? if [ $ret -eq 0 ]; then tst_resm TPASS "case$i($CASETYPE$CASECMD) PASS" -elif [ $ret -ne 9 ]; then +elif [ $ret -ne 32 ]; then tst_resm TFAIL "case$i($CASETYPE $CASECMD) FAIL" fi -exit $ret; +tst_exit
Unless the whole script is converted to the test.sh the exit $ret must stay here, otherwise the return status from the test will be always 0.
The rest looks fine.
Signature · 8 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 1/1 cgroup_fj: fixed exit codes in case of not supported tests
In reply to Cedric HnydaHi!
testcases/kernel/controllers/cgroup_fj/run_cgroup_test_fj.sh esac · line 132
Quoted 11 lines
testcases/kernel/controllers/cgroup_fj/run_cgroup_test_fj.sh +2
-2@@ -125,8 +125,8 @@ esac ret=$? if [ $ret -eq 0 ]; then tst_resm TPASS "case$i($CASETYPE$CASECMD) PASS" -elif [ $ret -ne 9 ]; then +elif [ $ret -ne 32 ]; then tst_resm TFAIL "case$i($CASETYPE $CASECMD) FAIL" fi -exit $ret; +tst_exit
Unless the whole script is converted to the test.sh the exit $ret must stay here, otherwise the return status from the test will be always 0.
The rest looks fine.
(CCing new list)
Signature · 2 lines
Cyril Hrubis [email protected]