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