selftests/cgroup: Fix incorrect variable check in online_cpus()

"OFFLINE_CPUS" is a literal string that is always non-empty. It should
be "$OFFLINE_CPUS" to check the variable's value instead.

Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Hongfu Li 2026-05-08 11:34:53 +08:00 committed by Tejun Heo
parent 5bbb3453e8
commit 7ea04cc4fe

View File

@ -617,7 +617,7 @@ set_ctrl_state_noerr()
online_cpus()
{
[[ -n "OFFLINE_CPUS" ]] && {
[[ -n "$OFFLINE_CPUS" ]] && {
for C in $OFFLINE_CPUS
do
write_cpu_online ${C}=1