Master script of Powermanagement testcase is modified to invoke cpu_consolidation testcase without workload. Restructured cpu_consolidation testcase within a loop.
Signed-off-by: poornima nayak <[email protected]> diff -uprN ltp_orig/testcases/kernel/power_management/runpwtests.sh ltp/testcases/kernel/power_management/runpwtests.sh --- ltp_orig/testcases/kernel/power_management/runpwtests.sh 2009-04-17 16:32:36.000000000 -0400 +++ ltp/testcases/kernel/power_management/runpwtests.sh 2009-04-17 17:01:17.000000000 -0400 @@ -73,81 +73,64 @@ if [ -f /sys/devices/system/cpu/sched_mc # Test CPU consolidation on hyper-threaded system hyper_threaded=$(is_hyper_threaded) if [ $hyper_threaded -eq 1 ]; then - cpu_consolidation.py -w ebizzy -c 1 -t 0; RC=$? - if [ $RC -eq 1 ] ; then - tst_resm TFAIL "cpu consolidation \ -sched_mc=1, sched_smt=0" - else - tst_resm TPASS "cpu consolidation sched_mc=1,\ -sched_smt=0" - fi - cpu_consolidation.py -w ebizzy -c 1 -t 1; RC=$? - if [ $RC -eq 1 ] ; then - tst_resm TFAIL "cpu consolidation test \ -sched_mc=1, sched_smt=1" - else - tst_resm TPASS "cpu consolidation sched_mc=1,\ -sched_smt=1" - fi - cpu_consolidation.py -w ebizzy -c 0 -t 1; RC=$? - if [ $RC -eq 1 ] ; then - tst_resm TFAIL "cpu consolidation test \ -sched_mc=0, sched_smt=1" - else - tst_resm TPASS "cpu consolidation sched_mc=0,\ -sched_smt=1" - fi + for sched_mc in `seq 0 2`; do + for sched_smt in `seq 0 1`; do + if [ $sched_smt -eq 0 -a $sched_mc -eq 0 ]; then + continue + fi + cpu_consolidation.py -c $sched_mc -t $sched_smt; RC=$? + if [ $RC -eq 1 ] ; then + tst_resm TFAIL "cpu consolidation \ + sched_mc=$sched_mc, sched_smt=$sched_smt" + else + tst_resm TPASS "cpu consolidation sched_mc=$sched_mc,\ + sched_smt=$sched_smt" + fi + done + done else - # Test CPU consolidation for sched_mc=1 - cpu_consolidation.py -w ebizzy -c 1; RC=$? - if [ $RC -eq 1 ] ; then - tst_resm TFAIL "cpu consolidation test\ - sched_mc_power set to 1" - else - tst_resm TPASS "cpu consolidation test for \ -sched_mc_power set to 1" - fi + # Test CPU consolidation for sched_mc=1 & 2 + for sched_mc in `seq 1 2`; do + cpu_consolidation.py -c $sched_mc; RC=$? + if [ $RC -eq 1 ] ; then + tst_resm TFAIL "cpu consolidation test\ + sched_mc_power set to $sched_mc" + else + tst_resm TPASS "cpu consolidation test for \ +sched_mc_power set to $sched_mc" + fi + done fi - # sched_mc =1 and sched_smt =0 + # Testcase to validate sched_domain tree if [ $hyper_threaded -eq 1 ]; then - # sched_mc =1 and sched_smt =0 - sched_domain.py -c 1 -t 0; RC=$? - if [ $RC -eq 1 ] ; then - tst_resm TFAIL "sched domain test sched_mc=1,\ -sched_smt=0 " - else - tst_resm TPASS "sched domain test sched_mc=1,\ -sched_smt=0 " - fi - - # sched_mc =1 and sched_smt =1 - sched_domain.py -c 1 -t 1; RC=$? - if [ $RC -eq 1 ] ; then - tst_resm TFAIL "sched domain test sched_mc=1,\ -sched_smt=1 " - else - tst_resm TPASS "sched domain test sched_mc=1,\ -sched_smt=1 " - fi - - # sched_mc =0 and sched_smt =1 - sched_domain.py -c 0 -t 1; RC=$? - if [ $RC -eq 1 ] ; then - tst_resm TFAIL "sched domain test sched_mc=0,\ -sched_smt=1 " - else - tst_resm TPASS "sched domain test sched_mc=0,\ -sched_smt=1 " - fi + for sched_mc in `seq 0 2`; do + for sched_smt in `seq 0 1`; do + if [ $sched_smt -eq 0 -a $sched_mc -eq 0 ]; then + continue + fi + + sched_domain.py -c $sched_mc -t $sched_smt; RC=$? + if [ $RC -eq 1 ] ; then + tst_resm TFAIL "sched domain test sched_mc=$sched_mc,\ +sched_smt=$sched_smt " + else + tst_resm TPASS "sched domain test sched_mc=$sched_mc,\ +sched_smt=$sched_smt " + fi + done + done else # Validate CPU level sched domain topology validation - sched_domain.py -c 1; RC=$? - if [ $RC -eq 1 ] ; then - tst_resm TFAIL "sched domain test for sched_mc=1 " - else - tst_resm TPASS "sched domain test for sched_mc=1 " - fi + for sched_mc in `seq 1 2`; do + sched_domain.py -c $sched_mc; RC=$? + if [ $RC -eq 1 ] ; then + tst_resm TFAIL "sched domain test for sched_mc=$sched_mc " + else + tst_resm TPASS "sched domain test for sched_mc=$sched_mc " + fi + done + fi fi else @@ -201,6 +184,6 @@ else tst_resm TFAIL "Required kernel configuration for SCHED_SMT NOT set" else tst_resm TCONF "Required Hyper Threading support in the\ - system under test" +system under test" fi fi ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
