selftests/cpu-hotplug: Reserve one cpu online at least
authorZhao Gongyi <zhaogongyi@huawei.com>
Mon, 5 Sep 2022 13:36:14 +0000 (21:36 +0800)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 5 Oct 2022 17:05:18 +0000 (11:05 -0600)
commit51d4c851465c32143d9c7b1cfb46fc581922b116
treeef2fd2264577258987bd1bd216f9ba0f50484e89
parent195d74be717af14e5991f818f73f067367bfc1ed
selftests/cpu-hotplug: Reserve one cpu online at least

Considering that we can not offline all cpus in any cases,
we need to reserve one cpu online when the test offline all
hotpluggable online cpus, otherwise the test will fail forever.

Fixes: d89dffa976bc ("fault-injection: add selftests for cpu and memory hotplug")
Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh