On Mon, Feb 2, 2015 at 7:34 AM, Lisa Nguyen lisa.nguyen@linaro.org wrote:
In PM-QA, there are programs written in C (e.g. cpuidle_killer, uevent_reader) that run in the background while some scripts are being.
However, remove the extra slash and period when it's not necessary and create variables to store the path of these programs.
Signed-off-by: Lisa Nguyen lisa.nguyen@linaro.org
cpuhotplug/cpuhotplug_07.sh | 4 +++- cpuidle/cpuidle_02.sh | 2 +- cpuidle/cpuidle_03.sh | 2 +- include/functions.sh | 3 ++- thermal/thermal_04.sh | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/cpuhotplug/cpuhotplug_07.sh b/cpuhotplug/cpuhotplug_07.sh index 8ae9f72..2e81f28 100755 --- a/cpuhotplug/cpuhotplug_07.sh +++ b/cpuhotplug/cpuhotplug_07.sh @@ -27,6 +27,7 @@
. ../include/functions.sh TMPFILE=cpuhotplug_07.tmp +UEVENT_READER="../utils/uevent_reader"
check_notification() { cpu=$1 @@ -38,8 +39,9 @@ check_notification() {
# damn ! udevadm is buffering the output, we have to use a temp file # to retrieve the output
- rm -f $TMPFILE
- ../utils/uevent_reader $TMPFILE &
- $UEVENT_READER $TMPFILE & pid=$! sleep 1
diff --git a/cpuidle/cpuidle_02.sh b/cpuidle/cpuidle_02.sh index 61176d7..4242e24 100755 --- a/cpuidle/cpuidle_02.sh +++ b/cpuidle/cpuidle_02.sh @@ -29,5 +29,5 @@
CPUIDLE_KILLER=./cpuidle_killer
-check "cpuidle program runs successfully (120 secs)" "./$CPUIDLE_KILLER" +check "cpuidle program runs successfully (120 secs)" "$CPUIDLE_KILLER" test_status_show diff --git a/cpuidle/cpuidle_03.sh b/cpuidle/cpuidle_03.sh index 5dbf37f..26d3e28 100755 --- a/cpuidle/cpuidle_03.sh +++ b/cpuidle/cpuidle_03.sh @@ -46,7 +46,7 @@ check_cpuidle_kill() { fi
set_offline $1
- check "cpuidle program runs successfully (120 secs)" "./$CPUIDLE_KILLER"
- check "cpuidle program runs successfully (120 secs)" "$CPUIDLE_KILLER"
}
trap "restore_cpus; sigtrap" HUP INT TERM diff --git a/include/functions.sh b/include/functions.sh index 2ffdb36..97930ae 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -34,6 +34,7 @@ pass_count=0 fail_count=0 skip_count=0 test_script_status="pass" +nanosleep="../utils/nanosleep"
If you're using ALL CAPs variable names for all the external programs, why leave this one out? :)
test_status_show() { if [ $fail_count -ne 0 ]; then @@ -180,7 +181,7 @@ wait_latency() {
sleep_time=$(($latency + $sampling_rate))
- ../utils/nanosleep $(($nrfreq * $sleep_time))
- $nanosleep $(($nrfreq * $sleep_time))
}
frequnit() { diff --git a/thermal/thermal_04.sh b/thermal/thermal_04.sh index 37c65f6..b290c5a 100755 --- a/thermal/thermal_04.sh +++ b/thermal/thermal_04.sh @@ -54,7 +54,7 @@ verify_cooling_device_temp_change() { init_temp=0 final_temp=0 cool_temp=0
- ./$HEAT_CPU_MODERATE moderate &
- $HEAT_CPU_MODERATE moderate & pid=$! test $pid -eq 0 && return
-- 1.7.9.5