Message ID | 20231213082556.1401741-2-lizhijian@fujitsu.com |
---|---|
State | Accepted |
Commit | aec55008a572b9f5ea782764b7cde51da702fb62 |
Headers | show |
Series | [ndctl,v3,1/2] test/cxl-region-sysfs.sh: use '[[ ]]' command to evaluate operands as arithmetic expressions | expand |
diff --git a/test/cxl-region-sysfs.sh b/test/cxl-region-sysfs.sh index 6a5da6d..db1a163 100644 --- a/test/cxl-region-sysfs.sh +++ b/test/cxl-region-sysfs.sh @@ -104,7 +104,7 @@ do iw=$(cat /sys/bus/cxl/devices/$i/interleave_ways) ig=$(cat /sys/bus/cxl/devices/$i/interleave_granularity) [ $iw -ne $nr_targets ] && err "$LINENO: decoder: $i iw: $iw targets: $nr_targets" - [ $ig -ne $r_ig] && err "$LINENO: decoder: $i ig: $ig root ig: $r_ig" + [ $ig -ne $r_ig ] && err "$LINENO: decoder: $i ig: $ig root ig: $r_ig" sz=$(cat /sys/bus/cxl/devices/$i/size) res=$(cat /sys/bus/cxl/devices/$i/start)
Currently the cxl-region-sysfs.sh test runs to completion and passes, but with syntax errors in the log. It turns out that because the test is checking for a positive condition as a failure, that also happens to mask the syntax errors. Fix the syntax and note that this also happens to unblock a test case that was being hidden by this error. Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> --- V3: update changelog per Dan's comments --- test/cxl-region-sysfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)