From: poornima n. <mp...@li...> - 2009-03-06 07:22:57
|
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 |