From: Hongfu Li Date: Fri, 8 May 2026 03:34:53 +0000 (+0800) Subject: selftests/cgroup: Fix incorrect variable check in online_cpus() X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=7ea04cc4fe3cee2139cc2474cadaecc7c53d986d;p=thirdparty%2Flinux.git 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 Signed-off-by: Tejun Heo --- diff --git a/tools/testing/selftests/cgroup/test_cpuset_prs.sh b/tools/testing/selftests/cgroup/test_cpuset_prs.sh index a56f4153c64df..df89ddfa073ff 100755 --- a/tools/testing/selftests/cgroup/test_cpuset_prs.sh +++ b/tools/testing/selftests/cgroup/test_cpuset_prs.sh @@ -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