.. | .. |
---|
30 | 30 | # kselftest skip code is 4 |
---|
31 | 31 | err_skip=4 |
---|
32 | 32 | |
---|
| 33 | +# umount required |
---|
| 34 | +UMOUNT_DIR="" |
---|
| 35 | + |
---|
33 | 36 | # cgroup RT scheduling prevents chrt commands from succeeding, which |
---|
34 | 37 | # induces failures in test wakeup tests. Disable for the duration of |
---|
35 | 38 | # the tests. |
---|
.. | .. |
---|
44 | 47 | |
---|
45 | 48 | cleanup() { |
---|
46 | 49 | echo $sched_rt_runtime_orig > $sched_rt_runtime |
---|
| 50 | + if [ -n "${UMOUNT_DIR}" ]; then |
---|
| 51 | + umount ${UMOUNT_DIR} ||: |
---|
| 52 | + fi |
---|
47 | 53 | } |
---|
48 | 54 | |
---|
49 | 55 | errexit() { # message |
---|
.. | .. |
---|
155 | 161 | mount -t tracefs nodev /sys/kernel/tracing || |
---|
156 | 162 | errexit "Failed to mount /sys/kernel/tracing" |
---|
157 | 163 | TRACING_DIR="/sys/kernel/tracing" |
---|
| 164 | + UMOUNT_DIR=${TRACING_DIR} |
---|
158 | 165 | # If debugfs exists, then so does /sys/kernel/debug |
---|
159 | 166 | elif [ -d "/sys/kernel/debug" ]; then |
---|
160 | 167 | mount -t debugfs nodev /sys/kernel/debug || |
---|
161 | 168 | errexit "Failed to mount /sys/kernel/debug" |
---|
162 | 169 | TRACING_DIR="/sys/kernel/debug/tracing" |
---|
| 170 | + UMOUNT_DIR=${TRACING_DIR} |
---|
163 | 171 | else |
---|
164 | 172 | err_ret=$err_skip |
---|
165 | 173 | errexit "debugfs and tracefs are not configured in this kernel" |
---|