diff options
author | Juri Lelli <juri.lelli@arm.com> | 2016-01-25 21:45:17 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2016-01-25 21:47:04 +0530 |
commit | d148c5b462e476341a9044febea460b380e01539 (patch) | |
tree | ebd57cbdf5b023adccf073df54837f82b6758fef | |
parent | af5c563efd3c5b8298ffd3d9da91e220a4151ebe (diff) |
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rwxr-xr-x | cpu.sh | 7 | ||||
-rwxr-xr-x | runme.sh | 6 | ||||
-rwxr-xr-x | special-tests.sh | 30 |
3 files changed, 42 insertions, 1 deletions
@@ -63,6 +63,13 @@ for_each_cpu() { done } +for_each_cpu_concurrent() { + cpus=$(ls $CPU_PATH | grep "cpu[0-9].*") + for cpu in $cpus; do + $@ $cpu & + done +} + for_each_non_boot_cpu() { cpus=$(ls $CPU_PATH | grep "cpu[1-9].*") for cpu in $cpus; do @@ -11,7 +11,7 @@ source special-tests.sh FUNC=basic # do basic tests by default # Check validity of arguments -USAGE="Usage: $0 [-h] [-odgf args]\n\t[-h <help>]\n\t[-o <output-file-for-dump>]\n\t[-d <driver's module name: only with -f=modtest>] \n\t[-g <governor's module name: only with -f=modtest>] \n\t[-f <basic: cpufreq_basic_tests, suspend, hibernate, sp1: governor_race, sp2: simple_lockdep, sp3: hotplug_with_updates, modtest: driver as module>]\n" +USAGE="Usage: $0 [-h] [-odgf args]\n\t[-h <help>]\n\t[-o <output-file-for-dump>]\n\t[-d <driver's module name: only with -f=modtest>] \n\t[-g <governor's module name: only with -f=modtest>] \n\t[-f <basic: cpufreq_basic_tests, suspend, hibernate, sp1: governor_race, sp2: simple_lockdep, sp3: hotplug_with_updates, sp4: concurrent_lockdep, modtest: driver as module>]\n" # Parse arguments parse_arguments() @@ -107,6 +107,10 @@ __run_func() hotplug_with_updates ;; + "sp4") + concurrent_lockdep + ;; + *) echo "Invalid [-f] function type" printf "$USAGE" diff --git a/special-tests.sh b/special-tests.sh index 6cd5537..868b4ac 100755 --- a/special-tests.sh +++ b/special-tests.sh @@ -99,3 +99,33 @@ hotplug_with_updates() { for_each_non_boot_cpu hotplug_with_updates_cpu } + +# Test 4 +# $1: cpu +__concurrent_lockdep() +{ + for i in `seq 0 100`; do + # switch to ondemand + __switch_governor $1 "ondemand" + + # cat ondemand files + local ondir=$(find_gov_directory $1 "ondemand") + if [ -z $ondir ]; then + echo "${FUNCNAME[0]}Ondemand directory not created, quit" + return + fi + + cat $ondir/* + + # switch to conservative + __switch_governor $1 "conservative" + done +} + +concurrent_lockdep() +{ + echo "** Test: Running ${FUNCNAME[0]} **" + echo "" + + for_each_cpu_concurrent __concurrent_lockdep +} |