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 ktap_exit_fail_msg "Insmod $1 failed\n"
30 printf "Removing $1 module\n"
32 rmmod $1
34 ktap_exit_fail_msg "rmmod $1 failed\n"
37 printf "\n"
41 # $1: cpufreq-driver module to insert
42 # $2: If we want to play with CPUs (1) or not (0)
45 printf "** Test: Running ${FUNCNAME[0]} for driver $1 and cpus_hotplug=$2 **\n\n"
47 if [ $2 -eq 1 ]; then
48 # offline all non-boot CPUs
50 printf "\n"
54 printf "Inserting $1 module\n\n"
55 insmod $1
57 printf "Insmod $1 failed\n"
61 if [ $2 -eq 1 ]; then
62 # online all non-boot CPUs
64 printf "\n"
71 printf "Removing $1 module\n\n"
72 rmmod $1
74 printf "rmmod $1 failed\n"
80 printf "\n"
83 # $1: cpufreq-driver module to insert
86 printf "** Test: Running ${FUNCNAME[0]} **\n\n"
89 ls $1 > /dev/null
91 printf "$1: not present in `pwd` folder\n"
96 test_basic_insmod_rmmod $1
99 module_driver_test_single $1 0
102 module_driver_test_single $1 1
103 printf "\n"
107 # $1: governor module name
110 if [ $1 = "cpufreq_ondemand.ko" ]; then
112 elif [ $1 = "cpufreq_conservative.ko" ]; then
114 elif [ $1 = "cpufreq_userspace.ko" ]; then
116 elif [ $1 = "cpufreq_performance.ko" ]; then
118 elif [ $1 = "cpufreq_powersave.ko" ]; then
120 elif [ $1 = "cpufreq_schedutil.ko" ]; then
125 # $1: governor string, $2: governor module, $3: policy
129 printf "** Test: Running ${FUNCNAME[0]} for $3 **\n\n"
134 printf "Switch from $CUR_GOV to $1\n"
135 switch_show_governor $3 $1
138 printf "Removing $2 module\n\n"
141 printf "WARN: rmmod $2 succeeded even if governor is used\n"
144 printf "Pass: unable to remove $2 while it is being used\n\n"
148 printf "Switchback to $CUR_GOV from $1\n"
150 printf "\n"
154 # $1: cpufreq-governor module to insert
157 printf "** Test: Running ${FUNCNAME[0]} **\n\n"
160 ls $1 > /dev/null
162 printf "$1: not present in `pwd` folder\n"
167 test_basic_insmod_rmmod $1
170 printf "Inserting $1 module\n\n"
171 insmod $1
173 printf "Insmod $1 failed\n"
178 for_each_policy module_governor_test_single $(find_gov_name $1) $1
181 printf "Removing $1 module\n\n"
182 rmmod $1
184 printf "rmmod $1 failed\n"
187 printf "\n"
191 # $1: driver module, $2: governor module
194 printf "** Test: Running ${FUNCNAME[0]} **\n\n"
197 ls $1 $2 > /dev/null
199 printf "$1 or $2: is not present in `pwd` folder\n"
205 printf "Inserting $1 module\n\n"
206 insmod $1
208 printf "Insmod $1 failed\n"
216 printf "Removing $1 module\n\n"
217 rmmod $1
219 printf "rmmod $1 failed\n"
225 printf "Inserting $2 module\n\n"
228 printf "Insmod $2 failed\n"
233 module_driver_test $1
236 printf "Removing $2 module\n\n"
239 printf "rmmod $2 failed\n"