aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README13
-rwxr-xr-xcpu-freq-tests.sh11
-rwxr-xr-xcpu-governor-tests.sh2
3 files changed, 13 insertions, 13 deletions
diff --git a/README b/README
index 789eb7e..331d291 100644
--- a/README
+++ b/README
@@ -1,16 +1,15 @@
CPUFREQ SANITY TESTS
====================
-This does a variety of tests to test cpufreq frameworks again bugs.
+This does a variety of tests to test cpufreq frameworks.
Examples:
-- hoplugging CPUs in and out.
-- switching governors.
-- switching frequencies after setting to userspace governor (if available).
+- Hot plugging CPUs in and out.
+- Switching governors (from list of available governors).
+- Switching frequencies after setting to userspace governor (if available).
- Showing content of all cpufreq files.
-- And finally dumping all debug messages in: ${1-debug}.txt and ${1-debug}.full.txt.
+- Dumping all output messages in: $0.output.txt and dmesg in: $0.dmesg.txt
How to run:
==========
-
-./runme.sh <output-file-name>
+./cpu-freq-tests.sh
diff --git a/cpu-freq-tests.sh b/cpu-freq-tests.sh
index 5f15ead..ca38734 100755
--- a/cpu-freq-tests.sh
+++ b/cpu-freq-tests.sh
@@ -21,7 +21,7 @@ check_root()
if [ $uid -ne 0 ]; then
echo $msg must be run as root >&2
- exit 0
+ exit 1
fi
}
@@ -51,7 +51,7 @@ __read_cpufreq_files()
# Exit if cpu isn't mananged by cpufreq core
if [ ! -d $filepath ]; then
- return;
+ exit 1
fi
local files=`ls $filepath`
@@ -102,7 +102,7 @@ __update_cpufreq_files()
# Exit if cpu isn't mananged by cpufreq core
if [ ! -d $filepath ]; then
- return;
+ exit 1
fi
local files=`ls $filepath`
@@ -171,13 +171,13 @@ test_all_cpu_frequencies()
# Exit if cpu isn't mananged by cpufreq core
if [ ! -d $filepath ]; then
- return;
+ exit 1
fi
local found=$(switch_governor $1 "userspace")
if [ $found = 1 ]; then
echo "${FUNCNAME[0]}: userspace governor not available for: $1"
- return;
+ exit 1
else
echo "Switching governor for $1 to userspace"
fi
@@ -258,3 +258,4 @@ clear_dumps
check_root
cpufreq_basic_tests 2>&1 | tee $0.output.txt
dmesg_dumps
+exit 0
diff --git a/cpu-governor-tests.sh b/cpu-governor-tests.sh
index b7207d7..574802d 100755
--- a/cpu-governor-tests.sh
+++ b/cpu-governor-tests.sh
@@ -70,7 +70,7 @@ call_for_each_governor() {
# Exit if cpu isn't mananged by cpufreq core
if [ ! -f $filepath ]; then
- return;
+ exit 1
fi
local governors=$(cat $filepath)