Skip to content

Commit 089bca7

Browse files
daniellertsKelsey Skunberg
authored andcommitted
selftests: mlxsw: Remove a redundant if statement in tc_flower_scale test
BugLink: https://bugs.launchpad.net/bugs/1929455 [ Upstream commit 1f1c921 ] Currently, the error return code of the failure condition is lost after using an if statement, so the test doesn't fail when it should. Remove the if statement that separates the condition and the error code check, so the test won't always pass. Fixes: abfce9e ("selftests: mlxsw: Reduce running time using offload indication") Reported-by: Ido Schimmel <[email protected]> Signed-off-by: Danielle Ratson <[email protected]> Reviewed-by: Petr Machata <[email protected]> Signed-off-by: Petr Machata <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Kelsey Skunberg <[email protected]>
1 parent 000541d commit 089bca7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,7 @@ __tc_flower_test()
9898
jq -r '[ .[] | select(.kind == "flower") |
9999
.options | .in_hw ]' | jq .[] | wc -l)
100100
[[ $((offload_count - 1)) -eq $count ]]
101-
if [[ $should_fail -eq 0 ]]; then
102-
check_err $? "Offload mismatch"
103-
else
104-
check_err_fail $should_fail $? "Offload more than expacted"
105-
fi
101+
check_err_fail $should_fail $? "Attempt to offload $count rules (actual result $((offload_count - 1)))"
106102
}
107103

108104
tc_flower_test()

0 commit comments

Comments
 (0)