Message ID | 20201217153434.10945-1-jiangshanlai@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/2] selftest: don't offline the last CPU in cpu hotplug test | expand |
diff --git a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh index 0d26b5e3f966..5cdef96326a7 100755 --- a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh +++ b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh @@ -126,6 +126,11 @@ offline_cpu_expect_success() { local cpu=$1 + # don't offline the last CPU if all CPUs are offline-able + if [[ a$cpu = a`cat $SYSFS/devices/system/cpu/online` ]]; then + return + fi + if ! offline_cpu $cpu; then echo $FUNCNAME $cpu: unexpected fail >&2 exit 1