]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/cgroup: Fix string comparison in write_test
authorHongfu Li <lihongfu@kylinos.cn>
Mon, 11 May 2026 01:39:57 +0000 (09:39 +0800)
committerTejun Heo <tj@kernel.org>
Mon, 11 May 2026 01:54:12 +0000 (15:54 -1000)
commit2a3d7256faf06d1a15bb5b07e851ac4e1680c26d
treed0a8f9f2081e2a891f0953dfa8de3bf71928e742
parente32e6f02168f2ad7991eb5d160d312d2001520c8
selftests/cgroup: Fix string comparison in write_test

Use string comparison (!=) instead of numeric comparison (-ne) for
cpuset values like "0-1".
For example:
$ [[ "0-1" != "2-3" ]] && echo "true" || echo "false"
true
$ [[ "0-1" -ne "2-3" ]] && echo "true" || echo "false"
false

Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/testing/selftests/cgroup/test_cpuset_v1_base.sh