2 # SPDX-License-Identifier: GPL-2.0
4 # Special test cases reported by people
6 # Testcase 1: Reported here: http://marc.info/?l=linux-pm&m=140618592709858&w=2
8 # protect against multiple inclusion
9 if [ $FILE_SPECIAL ]; then
24 __switch_governor
$1 "ondemand"
27 local ondir
=$
(find_gov_directory
$1 "ondemand")
28 if [ -z $ondir ]; then
29 printf "${FUNCNAME[0]}Ondemand directory not created, quit"
35 # switch to conservative
36 __switch_governor
$1 "conservative"
41 printf "** Test: Running ${FUNCNAME[0]} **\n"
43 for_each_policy __simple_lockdep
48 __concurrent_lockdep
()
50 for i
in `seq 0 100`; do
57 printf "** Test: Running ${FUNCNAME[0]} **\n"
59 for_each_policy_concurrent __concurrent_lockdep
65 # this is called concurrently from governor_race
68 echo ondemand | sudo
tee $CPUFREQROOT/policy
*/scaling_governor
&
69 echo userspace | sudo
tee $CPUFREQROOT/policy
*/scaling_governor
&
75 printf "** Test: Running ${FUNCNAME[0]} **\n"
77 # run 8 concurrent instances
86 hotplug_with_updates_cpu
()
88 local filepath
="$CPUROOT/$1/cpufreq"
91 __switch_governor_for_cpu
$1 "ondemand"
98 local freqs
=$
(cat $filepath/scaling_available_frequencies
)
99 local oldfreq
=$
(cat $filepath/scaling_min_freq
)
101 for j
in `seq 1 5000`
103 # Set all frequencies one-by-one
104 for freq
in $freqs; do
105 echo $freq > $filepath/scaling_min_freq
110 echo $oldfreq > $filepath/scaling_min_freq
113 hotplug_with_updates
()
115 for_each_non_boot_cpu hotplug_with_updates_cpu