Couple patches to ensure that PM-QA scripts will run in order and remove unnecessary checks in cpuidle_08 and cpuidle_09 scripts.
Lisa Nguyen (2): Test: Add sort function cpufreq: Remove unnecessary checks
Test.mk | 2 +- cpufreq/cpufreq_08.sh | 3 --- cpufreq/cpufreq_09.sh | 6 ------ 3 files changed, 1 insertion(+), 10 deletions(-)
Use the built-in sort function to ensure that the PM-QA scripts will run in order. Some platforms may run makefile versions greater than 3.82.
See the following link for details: https://lists.gnu.org/archive/html/info-gnu/2010-07/msg00023.html
Signed-off-by: Lisa Nguyen lisa.nguyen@linaro.org --- Test.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Test.mk b/Test.mk index 66fe44b..fb7d41a 100644 --- a/Test.mk +++ b/Test.mk @@ -22,7 +22,7 @@ # - initial API and implementation
SNT=$(wildcard *sanity.sh) -TST=$(wildcard *[^{sanity}].sh) +TST=$(sort $(wildcard *[!{sanity}].sh)) LOG=$(TST:.sh=.log) CFLAGS?=-g -Wall -pthread CC?=gcc
The check function already determines if a subtest fails, passes, or skips. No need to check for the return value of the command.
Signed-off-by: Lisa Nguyen lisa.nguyen@linaro.org --- cpufreq/cpufreq_08.sh | 3 --- cpufreq/cpufreq_09.sh | 6 ------ 2 files changed, 9 deletions(-)
diff --git a/cpufreq/cpufreq_08.sh b/cpufreq/cpufreq_08.sh index f81976d..7821897 100755 --- a/cpufreq/cpufreq_08.sh +++ b/cpufreq/cpufreq_08.sh @@ -43,9 +43,6 @@ check_frequency() { kill $pid
check "'userspace' $(frequnit $freq) is fixed" "test "$curfreq" = "$freq"" - if [ "$?" != "0" ]; then - return 1 - fi
return 0 } diff --git a/cpufreq/cpufreq_09.sh b/cpufreq/cpufreq_09.sh index 2ba1652..3e40cbf 100755 --- a/cpufreq/cpufreq_09.sh +++ b/cpufreq/cpufreq_09.sh @@ -41,9 +41,6 @@ check_powersave() { curfreq=$(get_frequency $cpu)
check "'powersave' sets frequency to $(frequnit $minfreq)" "test "$curfreq" = "$minfreq"" - if [ "$?" != "0" ]; then - return 1 - fi
$CPUBURN $cpu & pid=$! @@ -53,9 +50,6 @@ check_powersave() { kill $pid
check "'powersave' frequency $(frequnit $minfreq) is fixed" "test "$curfreq" = "$minfreq"" - if [ "$?" -ne "0" ]; then - return 1 - fi
return 0 }
On Thu, Feb 19, 2015 at 5:44 AM, Lisa Nguyen lisa.nguyen@linaro.org wrote:
The check function already determines if a subtest fails, passes, or skips. No need to check for the return value of the command.
Signed-off-by: Lisa Nguyen lisa.nguyen@linaro.org
cpufreq/cpufreq_08.sh | 3 --- cpufreq/cpufreq_09.sh | 6 ------ 2 files changed, 9 deletions(-)
diff --git a/cpufreq/cpufreq_08.sh b/cpufreq/cpufreq_08.sh index f81976d..7821897 100755 --- a/cpufreq/cpufreq_08.sh +++ b/cpufreq/cpufreq_08.sh @@ -43,9 +43,6 @@ check_frequency() { kill $pid
check "'userspace' $(frequnit $freq) is fixed" "test \"$curfreq\" = \"$freq\""
if [ "$?" != "0" ]; then
return 1
fi
return 0
} diff --git a/cpufreq/cpufreq_09.sh b/cpufreq/cpufreq_09.sh index 2ba1652..3e40cbf 100755 --- a/cpufreq/cpufreq_09.sh +++ b/cpufreq/cpufreq_09.sh @@ -41,9 +41,6 @@ check_powersave() { curfreq=$(get_frequency $cpu)
check "'powersave' sets frequency to $(frequnit $minfreq)" "test \"$curfreq\" = \"$minfreq\""
- if [ "$?" != "0" ]; then
return 1
- fi
Hmm, I'm confused. If you remove these, execution of the script continues regardless of the the return code of check(). Is that desirable?
We seem to do it in other places too...
$CPUBURN $cpu & pid=$!
@@ -53,9 +50,6 @@ check_powersave() { kill $pid
check "'powersave' frequency $(frequnit $minfreq) is fixed" "test \"$curfreq\" = \"$minfreq\""
if [ "$?" -ne "0" ]; then
return 1
fi
return 0
}
1.7.9.5