aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-01-12 12:10:42 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2015-01-12 12:10:42 +0530
commitd59e94616386498db69b3875ac46225f405fd62a (patch)
treee81a6bb16bc28fc9c1ed092bd42a758d2877ac28
parent72a9761d3471ac3fd70ae709a3f9cc10937c1cee (diff)
move cpufreq basic test to cpufreq.c
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rwxr-xr-xcpufreq.sh34
-rwxr-xr-xrunme.sh33
2 files changed, 34 insertions, 33 deletions
diff --git a/cpufreq.sh b/cpufreq.sh
index e89e317..f6d93f2 100755
--- a/cpufreq.sh
+++ b/cpufreq.sh
@@ -199,3 +199,37 @@ call_routine()
# We may need the full logs as well
dmesg --read-clear > $2.full.txt
}
+
+# Basic cpufreq tests
+cpufreq_basic_tests()
+{
+ echo "*** RUNNING CPUFREQ SANITY TESTS ***"
+ echo "===================================="
+ echo ""
+
+ count=$(count_cpufreq_managed_cpus)
+ if [ $count = 0 ]; then
+ echo "No cpu is managed by cpufreq core, exiting"
+ exit;
+ else
+ echo "CPUFreq manages: $count CPUs"
+ echo ""
+ fi
+
+ # Detect & print which CPUs aren't managed by cpufreq
+ print_unmanaged_cpus
+
+ # read/update all cpufreq files
+ read_all_cpufreq_files
+ update_all_cpufreq_files
+
+ # hotplug cpus
+ hotplug_1_by_1 5
+ hotplug_together 5
+
+ # Test all governors
+ shuffle_governors_for_all_cpus 1
+
+ # Test all frequencies
+ shuffle_frequency_for_all_cpus 2
+}
diff --git a/runme.sh b/runme.sh
index 261d957..360315c 100755
--- a/runme.sh
+++ b/runme.sh
@@ -13,39 +13,6 @@ FUNC=basic # do basic tests by default
# Check validity of arguments
USAGE="Usage: $0 [-h] [-of args] [-h <help>] [-o <output-file-for-dump>] [-f <basic: cpufreq_basic_tests, sp1: governor_race, sp2: simple_lockdep, sp3: hotplug_with_updates>]"
-cpufreq_basic_tests()
-{
- echo "*** RUNNING CPUFREQ SANITY TESTS ***"
- echo "===================================="
- echo ""
-
- count=$(count_cpufreq_managed_cpus)
- if [ $count = 0 ]; then
- echo "No cpu is managed by cpufreq core, exiting"
- exit;
- else
- echo "CPUFreq manages: $count CPUs"
- echo ""
- fi
-
- # Detect & print which CPUs aren't managed by cpufreq
- print_unmanaged_cpus
-
- # read/update all cpufreq files
- read_all_cpufreq_files
- update_all_cpufreq_files
-
- # hotplug cpus
- hotplug_1_by_1 5
- hotplug_together 5
-
- # Test all governors
- shuffle_governors_for_all_cpus 1
-
- # Test all frequencies
- shuffle_frequency_for_all_cpus 2
-}
-
# Parse arguments
parse_arguments()
{