selftests: mlxsw: Remove a redundant if statement in tc_flower_scale test
[ Upstream commit1f1c92139e] 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:abfce9e062("selftests: mlxsw: Reduce running time using offload indication") Reported-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Danielle Ratson <danieller@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8ebdce8fe0
commit
1625872f01
1 changed files with 1 additions and 5 deletions
|
|
@ -98,11 +98,7 @@ __tc_flower_test()
|
|||
jq -r '[ .[] | select(.kind == "flower") |
|
||||
.options | .in_hw ]' | jq .[] | wc -l)
|
||||
[[ $((offload_count - 1)) -eq $count ]]
|
||||
if [[ $should_fail -eq 0 ]]; then
|
||||
check_err $? "Offload mismatch"
|
||||
else
|
||||
check_err_fail $should_fail $? "Offload more than expacted"
|
||||
fi
|
||||
check_err_fail $should_fail $? "Attempt to offload $count rules (actual result $((offload_count - 1)))"
|
||||
}
|
||||
|
||||
tc_flower_test()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue