On 07/12/2023 05:37, Dan Williams wrote:
> Li Zhijian wrote:
>> Signed-off-by: Li Zhijian <[email protected]>
> 
> Please no patches with empty changelogs. Commentary on the impact of the
> change is always welcome.
> 
> Otherwise change looks good to me, and I wonder why this error is only
> triggering now?


I have to say current condition checking 1) easily hides *BUG*
1) [ a -ne b ] && echo NG

Instead, 2) as below are more reliable.
2) [ a -eq b ] || echo NG



> 
> Acked-by: Dan Williams <[email protected]>
> 
>> ---
>>   test/cxl-region-sysfs.sh | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/test/cxl-region-sysfs.sh b/test/cxl-region-sysfs.sh
>> index 89f21a3..3878351 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)
>> -- 
>> 2.41.0
>>
>>
> 
> 

Reply via email to