On 6/4/26 11:22 PM, Neil Spring wrote:
> +test_ecmp_midstream_rehash()
> +{
> + RET=0
> + local port=$((PORT + 1))
> +
> + local fail_reason
> + fail_reason=$(ecmp_midstream_rehash_attempt "$port")
Shellcheck complains for the above:
+ if [ $? -ne 0 ]; then
+ ^-- SC2181 (style): Check exit code directly with e.g. 'if
! mycmd;', not indirectly with $?.
+
Eiter disable the check or use:
if fail_reason=$(ecmp_midstream_rehash_attempt "$port"); then
/P
