Arguments passed for cpu consolidation was not used appropriatly. Provided
TINFO messages to indicate dependency test failures.

Signed-off-by: poornima nayak <[email protected]>

diff -uprN ltp-full-20090930/testcases/kernel/power_management/pm_include.sh 
ltp-full-20090930_patched/testcases/kernel/power_management/pm_include.sh
--- ltp-full-20090930/testcases/kernel/power_management/pm_include.sh   
2009-10-05 02:10:56.000000000 -0400
+++ ltp-full-20090930_patched/testcases/kernel/power_management/pm_include.sh   
2009-10-12 22:46:12.000000000 -0400
@@ -71,7 +71,7 @@ get_supporting_govr() {
 is_hyper_threaded() {
        siblings=`cat /proc/cpuinfo | grep siblings | uniq | cut -f2 -d':'`
        cpu_cores=`cat /proc/cpuinfo | grep "cpu cores" | uniq | cut -f2 -d':'`
-       [ $siblings > $cpu_cores ]; return $?
+       [ $siblings -gt $cpu_cores ]; return $?
 }
 
 check_input() {
@@ -148,8 +148,8 @@ get_valid_input() {
                
 analyze_result_hyperthreaded() {
        sched_mc=$1
-    pass_count=$3
-    sched_smt=$4
+    pass_count=$2
+    sched_smt=$3
 
        case "$sched_mc" in
        0)
@@ -165,7 +165,7 @@ $sched_mc & sched_smt=$sched_smt"
                        fi
                        ;;
                *)
-               if [ $pass_count -lt 5 ]; then
+                       if [ $pass_count -lt 5 ]; then
                        tst_resm TFAIL "cpu consolidation for sched_mc=\
 $sched_mc & sched_smt=$sched_smt"
                else
@@ -190,10 +190,16 @@ $sched_mc & sched_smt=$sched_smt"
 
 analyze_package_consolidation_result() {
        sched_mc=$1
-    pass_count=$3
-       sched_smt=$4
+    pass_count=$2
+
+       if [ $# -gt 2 ]
+       then
+               sched_smt=$3
+       else
+               sched_smt=-1
+       fi
 
-       if [ $hyper_threaded -eq $YES -a $sched_smt ]; then
+       if [ $hyper_threaded -eq $YES -a $sched_smt -gt -1 ]; then
                analyze_result_hyperthreaded $sched_mc $pass_count $sched_smt
        else
                case "$sched_mc" in
@@ -209,10 +215,10 @@ $sched_mc"
        *)
                        if [ $pass_count -lt 5 ]; then
                                tst_resm TFAIL "Consolidation at package level 
failed for \
-sched_mc=$sched_mc & sched_smt=$sched_smt"
+sched_mc=$sched_mc"
                        else
                                tst_resm TPASS "Consolidation at package level 
passed for \
-sched_mc=$sched_mc & sched_smt=$sched_smt"
+sched_mc=$sched_mc"
                        fi      
                ;;
        esac
@@ -221,7 +227,7 @@ sched_mc=$sched_mc & sched_smt=$sched_sm
 
 analyze_core_consolidation_result() {
        sched_smt=$1
-       pass_count=$3
+       pass_count=$2
 
        case "$sched_smt" in
        0)

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to