diff options
Diffstat (limited to 'special-tests.sh')
-rwxr-xr-x | special-tests.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/special-tests.sh b/special-tests.sh new file mode 100755 index 0000000..b29f644 --- /dev/null +++ b/special-tests.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# +# Special test cases reported by people + +# Testcase 1: Reported here: http://marc.info/?l=linux-pm&m=140618592709858&w=2 + +source cpu.sh +source cpufreq.sh +source governor.sh + +quick_shuffle_test1() +{ + # this is called concurrently from governor_race_test + for I in `seq 1000` + do + echo ondemand | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor & + echo userspace | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor & + done +} + +governor_race_test() +{ + echo "** Test: Running ${FUNCNAME[0]} **" + echo "" + + # run 8 concurrent instances + for I in `seq 8` + do + quick_shuffle_test1 & + done +} + +# $1: cpu +__simple_lockdep() +{ + # 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" +} + +simple_lockdep() +{ + echo "** Test: Running ${FUNCNAME[0]} **" + echo "" + + for_each_cpu __simple_lockdep +} +simple_lockdep +governor_race_test |