mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
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>
This commit is contained in:
parent
e32e6f0216
commit
2a3d7256fa
|
|
@ -18,7 +18,7 @@ write_test() {
|
|||
echo "testing $interface $value"
|
||||
echo $value > $dir/$interface
|
||||
new=$(cat $dir/$interface)
|
||||
[[ $value -ne $(cat $dir/$interface) ]] && {
|
||||
[[ "$value" != "$new" ]] && {
|
||||
echo "$interface write $value failed: new:$new"
|
||||
exit 1
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user