Commit b6fc2f21 authored by Danielle Ratson's avatar Danielle Ratson Committed by David S. Miller
Browse files

selftests: mlxsw: Remove a redundant if statement in port_scale test



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: 5154b1b8 ("selftests: mlxsw: Add a scale test for physical ports")
Reported-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarDanielle Ratson <danieller@nvidia.com>
Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c8d0260c
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -55,10 +55,6 @@ port_test()
	      | jq '.[][][] | select(.name=="physical_ports") |.["occ"]')

	[[ $occ -eq $max_ports ]]
	if [[ $should_fail -eq 0 ]]; then
		check_err $? "Mismatch ports number: Expected $max_ports, got $occ."
	else
		check_err_fail $should_fail $? "Reached more ports than expected"
	fi
	check_err_fail $should_fail $? "Attempt to create $max_ports ports (actual result $occ)"

}