aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLisa Nguyen <lisa.nguyen@linaro.org>2015-01-27 13:57:02 -0800
committerLisa Nguyen <lisa.nguyen@linaro.org>2015-02-02 13:50:50 -0800
commitd1e0be9e378a4a3c8ed51f4f802d7e7a314397e5 (patch)
treeea61041dfc926e531b9f9439539478ecfa6475c2
parentadf9df99d4d28e4e82aeb8189d0e9d102ab08103 (diff)
Replace double equals with one for comparison
Using double equals to evaluate whether two conditions are equal is considered BASH syntax. The POSIX compliant version uses one equal sign for evaluating. Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
-rwxr-xr-xcpufreq/cpufreq_03.sh2
-rwxr-xr-xcpufreq/cpufreq_04.sh2
-rwxr-xr-xcpufreq/cpufreq_07.sh4
-rwxr-xr-xcpufreq/cpufreq_08.sh2
-rwxr-xr-xcpufreq/cpufreq_09.sh4
-rwxr-xr-xcpuhotplug/cpuhotplug_02.sh2
-rwxr-xr-xcpuhotplug/cpuhotplug_03.sh2
-rwxr-xr-xcpuhotplug/cpuhotplug_04.sh2
-rwxr-xr-xcpuhotplug/cpuhotplug_05.sh2
-rwxr-xr-xcpuhotplug/cpuhotplug_06.sh2
-rwxr-xr-xcpuhotplug/cpuhotplug_07.sh2
-rw-r--r--include/functions.sh8
-rw-r--r--include/thermal_functions.sh2
13 files changed, 18 insertions, 18 deletions
diff --git a/cpufreq/cpufreq_03.sh b/cpufreq/cpufreq_03.sh
index 8aeeeb2..acd1c2a 100755
--- a/cpufreq/cpufreq_03.sh
+++ b/cpufreq/cpufreq_03.sh
@@ -38,7 +38,7 @@ check_governor() {
set_governor $cpu $newgov
- check "governor change to '$newgov'" "test \"$(get_governor $cpu)\" == \"$newgov\""
+ check "governor change to '$newgov'" "test \"$(get_governor $cpu)\" = \"$newgov\""
set_governor $cpu $oldgov
}
diff --git a/cpufreq/cpufreq_04.sh b/cpufreq/cpufreq_04.sh
index 71ee69d..98b0fa1 100755
--- a/cpufreq/cpufreq_04.sh
+++ b/cpufreq/cpufreq_04.sh
@@ -40,7 +40,7 @@ check_frequency() {
set_governor $cpu userspace
set_frequency $cpu $newfreq
- check "setting frequency '$(frequnit $newfreq)'" "test \"$(get_frequency $cpu)\" == \"$newfreq\""
+ check "setting frequency '$(frequnit $newfreq)'" "test \"$(get_frequency $cpu)\" = \"$newfreq\""
set_frequency $cpu $oldfreq
set_governor $cpu $oldgov
diff --git a/cpufreq/cpufreq_07.sh b/cpufreq/cpufreq_07.sh
index aef991f..2568b72 100755
--- a/cpufreq/cpufreq_07.sh
+++ b/cpufreq/cpufreq_07.sh
@@ -52,12 +52,12 @@ check_ondemand() {
curfreq=$(get_frequency $cpu)
kill $pid
- check "'ondemand' increase frequency on load" "test \"$curfreq\" == \"$maxfreq\""
+ check "'ondemand' increase frequency on load" "test \"$curfreq\" = \"$maxfreq\""
sleep 1
curfreq=$(get_frequency $cpu)
- check "'ondemand' decrease frequency on idle" "test \"$curfreq\" == \"$minfreq\""
+ check "'ondemand' decrease frequency on idle" "test \"$curfreq\" = \"$minfreq\""
return 0
fi
diff --git a/cpufreq/cpufreq_08.sh b/cpufreq/cpufreq_08.sh
index 3cc60f8..8eae7c0 100755
--- a/cpufreq/cpufreq_08.sh
+++ b/cpufreq/cpufreq_08.sh
@@ -44,7 +44,7 @@ check_frequency() {
curfreq=$(get_frequency $cpu)
kill $pid
- check "'userspace' $(frequnit $freq) is fixed" "test \"$curfreq\" == \"$freq\""
+ check "'userspace' $(frequnit $freq) is fixed" "test \"$curfreq\" = \"$freq\""
if [ "$?" != "0" ]; then
return 1
fi
diff --git a/cpufreq/cpufreq_09.sh b/cpufreq/cpufreq_09.sh
index f502b83..f227b62 100755
--- a/cpufreq/cpufreq_09.sh
+++ b/cpufreq/cpufreq_09.sh
@@ -40,7 +40,7 @@ check_powersave() {
wait_latency $cpu
curfreq=$(get_frequency $cpu)
- check "'powersave' sets frequency to $(frequnit $minfreq)" "test \"$curfreq\" == \"$minfreq\""
+ check "'powersave' sets frequency to $(frequnit $minfreq)" "test \"$curfreq\" = \"$minfreq\""
if [ "$?" != "0" ]; then
return 1
fi
@@ -52,7 +52,7 @@ check_powersave() {
curfreq=$(get_frequency $cpu)
kill $pid
- check "'powersave' frequency $(frequnit $minfreq) is fixed" "test \"$curfreq\" == \"$minfreq\""
+ check "'powersave' frequency $(frequnit $minfreq) is fixed" "test \"$curfreq\" = \"$minfreq\""
if [ "$?" -ne "0" ]; then
return 1
fi
diff --git a/cpuhotplug/cpuhotplug_02.sh b/cpuhotplug/cpuhotplug_02.sh
index 8caf5e6..564cb30 100755
--- a/cpuhotplug/cpuhotplug_02.sh
+++ b/cpuhotplug/cpuhotplug_02.sh
@@ -33,7 +33,7 @@ check_state() {
local state=
shift 1
- if [ "$cpu" == "cpu0" ]; then
+ if [ "$cpu" = "cpu0" ]; then
is_cpu0_hotplug_allowed $hotplug_allow_cpu0 || return 0
fi
diff --git a/cpuhotplug/cpuhotplug_03.sh b/cpuhotplug/cpuhotplug_03.sh
index 91c29ef..c32f6a4 100755
--- a/cpuhotplug/cpuhotplug_03.sh
+++ b/cpuhotplug/cpuhotplug_03.sh
@@ -33,7 +33,7 @@ check_affinity_fails() {
local dirpath=$CPU_PATH/$1
local ret=
- if [ "$cpu" == "cpu0" ]; then
+ if [ "$cpu" = "cpu0" ]; then
is_cpu0_hotplug_allowed $hotplug_allow_cpu0 || return 0
fi
diff --git a/cpuhotplug/cpuhotplug_04.sh b/cpuhotplug/cpuhotplug_04.sh
index 1f7efa7..1e3e8c1 100755
--- a/cpuhotplug/cpuhotplug_04.sh
+++ b/cpuhotplug/cpuhotplug_04.sh
@@ -36,7 +36,7 @@ check_task_migrate() {
local pid=
local ret=
- if [ "$cpu" == "cpu0" ]; then
+ if [ "$cpu" = "cpu0" ]; then
is_cpu0_hotplug_allowed $hotplug_allow_cpu0 || return 0
fi
diff --git a/cpuhotplug/cpuhotplug_05.sh b/cpuhotplug/cpuhotplug_05.sh
index 28f6f8c..71baf2c 100755
--- a/cpuhotplug/cpuhotplug_05.sh
+++ b/cpuhotplug/cpuhotplug_05.sh
@@ -32,7 +32,7 @@ check_procinfo() {
local cpuid=${cpu:3}
local ret=
- if [ "$cpu" == "cpu0" ]; then
+ if [ "$cpu" = "cpu0" ]; then
is_cpu0_hotplug_allowed $hotplug_allow_cpu0 || return 0
fi
diff --git a/cpuhotplug/cpuhotplug_06.sh b/cpuhotplug/cpuhotplug_06.sh
index df9deaf..a774438 100755
--- a/cpuhotplug/cpuhotplug_06.sh
+++ b/cpuhotplug/cpuhotplug_06.sh
@@ -32,7 +32,7 @@ check_procinfo() {
local cpuid=${cpu:3}
local ret=
- if [ "$cpu" == "cpu0" ]; then
+ if [ "$cpu" = "cpu0" ]; then
is_cpu0_hotplug_allowed $hotplug_allow_cpu0 || return 0
fi
diff --git a/cpuhotplug/cpuhotplug_07.sh b/cpuhotplug/cpuhotplug_07.sh
index 05b3a4b..c1f5e2c 100755
--- a/cpuhotplug/cpuhotplug_07.sh
+++ b/cpuhotplug/cpuhotplug_07.sh
@@ -34,7 +34,7 @@ check_notification() {
local pid=
local ret=
- if [ "$cpu" == "cpu0" ]; then
+ if [ "$cpu" = "cpu0" ]; then
is_cpu0_hotplug_allowed $hotplug_allow_cpu0 || return 0
fi
diff --git a/include/functions.sh b/include/functions.sh
index 033319b..35ca21d 100644
--- a/include/functions.sh
+++ b/include/functions.sh
@@ -50,9 +50,9 @@ test_status_show() {
fi
echo " "
- if [[ "$test_script_status" == "fail" ]]; then
+ if [ "$test_script_status" = "fail" ]; then
echo "$TEST_NAME: fail"
- elif [[ "$test_script_status" == "skip" ]]; then
+ elif [ "$test_script_status" = "skip" ]; then
echo "$TEST_NAME: skip"
else
echo "$TEST_NAME: pass"
@@ -79,9 +79,9 @@ log_begin() {
log_end() {
printf "$*\n"
- if [[ "$*" == "Err" ]]; then
+ if [ "$*" = "Err" ]; then
fail_count=$((fail_count + 1))
- elif [[ "$*" == "skip" ]]; then
+ elif [ "$*" = "skip" ]; then
skip_count=$((skip_count + 1))
else
pass_count=$((pass_count + 1))
diff --git a/include/thermal_functions.sh b/include/thermal_functions.sh
index f173e37..59f79a3 100644
--- a/include/thermal_functions.sh
+++ b/include/thermal_functions.sh
@@ -163,7 +163,7 @@ for_each_cooling_device() {
shift 1
devices=$(ls $THERMAL_PATH | grep "cooling_device['$MAX_CDEV']")
- if [ "$devices" == "" ]; then
+ if [ "$devices" = "" ]; then
log_skip "no cooling devices"
return 0
fi