]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/cgroup: Fix incorrect variable check in online_cpus()
authorHongfu Li <lihongfu@kylinos.cn>
Fri, 8 May 2026 03:34:53 +0000 (11:34 +0800)
committerTejun Heo <tj@kernel.org>
Fri, 8 May 2026 16:16:39 +0000 (06:16 -1000)
"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>
tools/testing/selftests/cgroup/test_cpuset_prs.sh

index a56f4153c64df86b51389b6f724fa668335cf962..df89ddfa073ff41aea671532eb2cd80c4403fb08 100755 (executable)
@@ -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