aboutsummaryrefslogtreecommitdiff
path: root/cpufreq
diff options
context:
space:
mode:
authorSanjay Singh Rawat <sanjay.rawat@linaro.org>2013-12-15 13:30:37 +0530
committerSanjay Singh Rawat <sanjay.rawat@linaro.org>2013-12-15 15:43:26 +0530
commitc7af87bdbce4a0105663f19b21b2560fc2cadec7 (patch)
treeaacf2ab593ce3af3e8cdc4d2da466e48d04cbe9d /cpufreq
parent7c440a6fda2c02f4d6a3598c2a2c202ca1afd227 (diff)
change options for numerical comparision
use directory test option for cpufreq test and add warning message for hotplug 07 test Signed-off-by: Carlos Hernandez <ceh@ti.com> Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
Diffstat (limited to 'cpufreq')
-rwxr-xr-xcpufreq/cpufreq_03.sh2
-rwxr-xr-xcpufreq/cpufreq_04.sh2
-rwxr-xr-xcpufreq/cpufreq_05.sh6
-rwxr-xr-xcpufreq/cpufreq_06.sh4
-rwxr-xr-xcpufreq/cpufreq_07.sh4
-rwxr-xr-xcpufreq/cpufreq_08.sh2
-rwxr-xr-xcpufreq/cpufreq_09.sh4
7 files changed, 12 insertions, 12 deletions
diff --git a/cpufreq/cpufreq_03.sh b/cpufreq/cpufreq_03.sh
index d41a979..0c59ce8 100755
--- a/cpufreq/cpufreq_03.sh
+++ b/cpufreq/cpufreq_03.sh
@@ -43,7 +43,7 @@ check_governor() {
set_governor $cpu $oldgov
}
-if [ $(id -u) != 0 ]; then
+if [ $(id -u) -ne 0 ]; then
log_skip "run as non-root"
exit 0
fi
diff --git a/cpufreq/cpufreq_04.sh b/cpufreq/cpufreq_04.sh
index 6092535..530366a 100755
--- a/cpufreq/cpufreq_04.sh
+++ b/cpufreq/cpufreq_04.sh
@@ -46,7 +46,7 @@ check_frequency() {
set_governor $cpu $oldgov
}
-if [ $(id -u) != 0 ]; then
+if [ $(id -u) -ne 0 ]; then
log_skip "run as non-root"
exit 0
fi
diff --git a/cpufreq/cpufreq_05.sh b/cpufreq/cpufreq_05.sh
index 72ca554..7830118 100755
--- a/cpufreq/cpufreq_05.sh
+++ b/cpufreq/cpufreq_05.sh
@@ -27,7 +27,7 @@
source ../include/functions.sh
-if [ $(id -u) != 0 ]; then
+if [ $(id -u) -ne 0 ]; then
log_skip "run as non-root"
exit 0
fi
@@ -55,7 +55,7 @@ check_governor() {
local cpu=$1
local gov=$2
- if [ -e $CPU_PATH/$cpu/cpufreq/$gov ]; then
+ if [ -d $CPU_PATH/$cpu/cpufreq/$gov ]; then
GOV_PATH=$CPU_PATH/$cpu/cpufreq/$gov
else
GOV_PATH=$CPU_PATH/cpufreq/$gov
@@ -97,7 +97,7 @@ fi
# if more than one cpu, combine governors
nrcpus=$(ls $CPU_PATH | grep "cpu[0-9].*" | wc -l)
-if [ $nrcpus > 1 ]; then
+if [ $nrcpus -gt 1 ]; then
affected=$(cat $CPU_PATH/cpu0/cpufreq/affected_cpus | grep 1)
if [ -z $affected ]; then
switch_ondemand cpu0
diff --git a/cpufreq/cpufreq_06.sh b/cpufreq/cpufreq_06.sh
index bfd38c9..25c473e 100755
--- a/cpufreq/cpufreq_06.sh
+++ b/cpufreq/cpufreq_06.sh
@@ -37,7 +37,7 @@ compute_freq_ratio() {
set_frequency $cpu $freq
result=$($CPUCYCLE $cpu)
- if [ $? != 0 ]; then
+ if [ $? -ne 0 ]; then
return 1
fi
@@ -101,7 +101,7 @@ check_deviation() {
for_each_frequency $cpu check_freq_deviation
}
-if [ $(id -u) != 0 ]; then
+if [ $(id -u) -ne 0 ]; then
log_skip "run as non-root"
exit 0
fi
diff --git a/cpufreq/cpufreq_07.sh b/cpufreq/cpufreq_07.sh
index 1e6bdbe..abfad7f 100755
--- a/cpufreq/cpufreq_07.sh
+++ b/cpufreq/cpufreq_07.sh
@@ -42,7 +42,7 @@ check_ondemand() {
# wait for a quescient point
for i in $(seq 1 10); do
- if [ "$minfreq" == "$(get_frequency $cpu)" ]; then
+ if [ "$minfreq" -eq "$(get_frequency $cpu)" ]; then
$CPUBURN $cpu &
pid=$!
@@ -77,7 +77,7 @@ check_ondemand() {
return 1
}
-if [ $(id -u) != 0 ]; then
+if [ $(id -u) -ne 0 ]; then
log_skip "run as non-root"
exit 0
fi
diff --git a/cpufreq/cpufreq_08.sh b/cpufreq/cpufreq_08.sh
index a2f395b..79008f0 100755
--- a/cpufreq/cpufreq_08.sh
+++ b/cpufreq/cpufreq_08.sh
@@ -66,7 +66,7 @@ check_userspace() {
save_governors
-if [ $(id -u) != 0 ]; then
+if [ $(id -u) -ne 0 ]; then
log_skip "run as non-root"
exit 0
fi
diff --git a/cpufreq/cpufreq_09.sh b/cpufreq/cpufreq_09.sh
index 1381efc..a0c1171 100755
--- a/cpufreq/cpufreq_09.sh
+++ b/cpufreq/cpufreq_09.sh
@@ -53,7 +53,7 @@ check_powersave() {
kill $pid
check "'powersave' frequency $(frequnit $minfreq) is fixed" "test \"$curfreq\" == \"$minfreq\""
- if [ "$?" != "0" ]; then
+ if [ "$?" -ne "0" ]; then
return 1
fi
@@ -62,7 +62,7 @@ check_powersave() {
save_governors
-if [ $(id -u) != 0 ]; then
+if [ $(id -u) -ne 0 ]; then
log_skip "run as non-root"
exit 0
fi