Lines Matching +full:n +full:- +full:1
2 # SPDX-License-Identifier: GPL-2.0
18 # $1: module
21 printf "** Test: Running ${FUNCNAME[0]} **\n\n"
23 printf "Inserting $1 module\n"
25 insmod $1
27 printf "Insmod $1 failed\n"
31 printf "Removing $1 module\n"
33 rmmod $1
35 printf "rmmod $1 failed\n"
39 printf "\n"
43 # $1: cpufreq-driver module to insert
44 # $2: If we want to play with CPUs (1) or not (0)
47 printf "** Test: Running ${FUNCNAME[0]} for driver $1 and cpus_hotplug=$2 **\n\n"
49 if [ $2 -eq 1 ]; then
50 # offline all non-boot CPUs
52 printf "\n"
56 printf "Inserting $1 module\n\n"
57 insmod $1
59 printf "Insmod $1 failed\n"
63 if [ $2 -eq 1 ]; then
64 # online all non-boot CPUs
66 printf "\n"
73 printf "Removing $1 module\n\n"
74 rmmod $1
76 printf "rmmod $1 failed\n"
82 printf "\n"
85 # $1: cpufreq-driver module to insert
88 printf "** Test: Running ${FUNCNAME[0]} **\n\n"
91 ls $1 > /dev/null
93 printf "$1: not present in `pwd` folder\n"
98 test_basic_insmod_rmmod $1
101 module_driver_test_single $1 0
104 module_driver_test_single $1 1
105 printf "\n"
109 # $1: governor module name
112 if [ $1 = "cpufreq_ondemand.ko" ]; then
114 elif [ $1 = "cpufreq_conservative.ko" ]; then
116 elif [ $1 = "cpufreq_userspace.ko" ]; then
118 elif [ $1 = "cpufreq_performance.ko" ]; then
120 elif [ $1 = "cpufreq_powersave.ko" ]; then
122 elif [ $1 = "cpufreq_schedutil.ko" ]; then
127 # $1: governor string, $2: governor module, $3: policy
131 printf "** Test: Running ${FUNCNAME[0]} for $3 **\n\n"
136 printf "Switch from $CUR_GOV to $1\n"
137 switch_show_governor $3 $1
140 printf "Removing $2 module\n\n"
143 printf "WARN: rmmod $2 succeeded even if governor is used\n"
146 printf "Pass: unable to remove $2 while it is being used\n\n"
150 printf "Switchback to $CUR_GOV from $1\n"
152 printf "\n"
156 # $1: cpufreq-governor module to insert
159 printf "** Test: Running ${FUNCNAME[0]} **\n\n"
162 ls $1 > /dev/null
164 printf "$1: not present in `pwd` folder\n"
169 test_basic_insmod_rmmod $1
172 printf "Inserting $1 module\n\n"
173 insmod $1
175 printf "Insmod $1 failed\n"
180 for_each_policy module_governor_test_single $(find_gov_name $1) $1
183 printf "Removing $1 module\n\n"
184 rmmod $1
186 printf "rmmod $1 failed\n"
189 printf "\n"
193 # $1: driver module, $2: governor module
196 printf "** Test: Running ${FUNCNAME[0]} **\n\n"
199 ls $1 $2 > /dev/null
201 printf "$1 or $2: is not present in `pwd` folder\n"
207 printf "Inserting $1 module\n\n"
208 insmod $1
210 printf "Insmod $1 failed\n"
218 printf "Removing $1 module\n\n"
219 rmmod $1
221 printf "rmmod $1 failed\n"
227 printf "Inserting $2 module\n\n"
230 printf "Insmod $2 failed\n"
235 module_driver_test $1
238 printf "Removing $2 module\n\n"
241 printf "rmmod $2 failed\n"