Re: [PATCH] selftests/cpu-hotplug: Fix check for cpu hotplug not supported

From: Shuah Khan

Date: Tue Mar 31 2026 - 18:10:46 EST


On 3/19/26 09:38, Dmytro Maluka wrote:
If CONFIG_HOTPLUG_CPU is disabled, /sys/devices/system/cpu/cpu*
directories are still populated, so the test fails to correctly detect
that CPU hotplug is not supported.

Fix this by checking for the presence of 'online' files in those
directories instead. The 'online' node is created for the given CPU if
and only if this CPU supports hotplug. So if none of the CPUs have
'online' nodes, it means CPU hotplug is not supported.

Signed-off-by: Dmytro Maluka <dmaluka@xxxxxxxxxxxx>
---

Applied to linux_kselftest next for Linux 7.1-rc1.

thanks,
-- Shuah