diff -uprN
ltp-full-20090228_orig/testcases/kernel/power_management/pwkm_load_unload.sh 
ltp-full-20090228_new/testcases/kernel/power_management/pwkm_load_unload.sh
---
ltp-full-20090228_orig/testcases/kernel/power_management/pwkm_load_unload.sh    
2008-10-23 08:31:35.000000000 -0500
+++
ltp-full-20090228_new/testcases/kernel/power_management/pwkm_load_unload.sh     
2009-03-04 14:38:08.000000000 -0600
@@ -1,19 +1,26 @@
 #!/bin/bash
 
 #Loading modules
+loaded_governor=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`
 for module in cpufreq_conservative cpufreq_powersave cpufreq_userspace
 do
        #echo -n "Loading $module ... "
-       modprobe $module >/dev/null
-       if [ $? -ne 0 ] ; then
-               echo "${0}: FAIL: Loading of module $module or check whether you
compiled as module or not"
+    if [ $module != "cpufreq_$loaded_governor" ];
+    then
+               modprobe $module >/dev/null
+               if [ $? -ne 0 ] ; then
+                       echo "${0}: FAIL: Loading of module $module or check 
whether you
compiled as module or not"
+               fi
        fi
 done
 for module in cpufreq_conservative cpufreq_powersave cpufreq_userspace
 do
        #echo -n "Unloading $module ... "
-       modprobe -r $module >/dev/null
-       if [ $? -ne 0 ] ; then
-               echo "${0}: FAIL: Loading of module $module or check whether you
compiled as module or not"
+    if [ $module != "cpufreq_$loaded_governor" ];
+    then
+               modprobe -r $module >/dev/null
+               if [ $? -ne 0 ] ; then
+                       echo "${0}: FAIL: Loading of module $module or check 
whether you
compiled as module or not"
+               fi
        fi
 done


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to