Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH] selftests/cgroup: Fix incorrect variable check in online_cpus()
@ 2026-05-08  3:34 Hongfu Li
  2026-05-08 16:51 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Hongfu Li @ 2026-05-08  3:34 UTC (permalink / raw)
  To: longman, chenridong, tj, hannes, mkoutny, shuah
  Cc: cgroups, linux-kselftest, linux-kernel, Hongfu Li

"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>
---
 tools/testing/selftests/cgroup/test_cpuset_prs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/cgroup/test_cpuset_prs.sh b/tools/testing/selftests/cgroup/test_cpuset_prs.sh
index a56f4153c64d..df89ddfa073f 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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-08 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08  3:34 [PATCH] selftests/cgroup: Fix incorrect variable check in online_cpus() Hongfu Li
2026-05-08 16:51 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox