Commit cbf2ec50 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'mlxsw-selftest-fixes'



Petr Machata says:

====================
selftests: mlxsw: Fixes

This patch set carries fixes to selftest issues that we have hit in our
nightly regression run. Almost all are in mlxsw selftests, though one is in
a generic forwarding selftest.

- In patch #1, in an ERSPAN test, install an FDB entry as static instead of
  (implicitly) as local.

- In the mlxsw resource-scale test, an if statement overrides the value of
  $?, which is supposed to contain the result of the test. As a result, the
  resource scale test can spuriously pass.

  In patches #2 and #3, remove the if statements to fix the issue in,
  respectively, port_scale test and tc_flower_scale tests.

- Again in the mlxsw resource-scale test, when more then one sub-test is
  run, a successful sub-test overrides any previous failures. This causes a
  spurious pass of the overall test. This is fixed in patch #4.

- In patch #5, increase a tolerance in a mlxsw-specific RED backlog test.
  This test is very noisy, due to rounding errors and the unpredictability
  of software traffic generation. By bumping the tolerance from 5 % to 10,
  get the failure rate to zero. This shouldn't impact the accuracy,
  mistakes in backlog configuration (e.g. due to wrong cell size) are
  likely to cause a much larger discrepancy.

- In patch #6, fix mausezahn invocation in the mlxsw ERSPAN scale
  test. The test failed because of the wrong invocation.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents e40fa65c 1233898a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -120,12 +120,13 @@ __mirror_gre_test()
	sleep 5

	for ((i = 0; i < count; ++i)); do
		local sip=$(mirror_gre_ipv6_addr 1 $i)::1
		local dip=$(mirror_gre_ipv6_addr 1 $i)::2
		local htun=h3-gt6-$i
		local message

		icmp6_capture_install $htun
		mirror_test v$h1 "" $dip $htun 100 10
		mirror_test v$h1 $sip $dip $htun 100 10
		icmp6_capture_uninstall $htun
	done
}
+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)"

}
+2 −2
Original line number Diff line number Diff line
@@ -507,8 +507,8 @@ do_red_test()
	check_err $? "backlog $backlog / $limit Got $pct% marked packets, expected == 0."
	local diff=$((limit - backlog))
	pct=$((100 * diff / limit))
	((0 <= pct && pct <= 5))
	check_err $? "backlog $backlog / $limit expected <= 5% distance"
	((0 <= pct && pct <= 10))
	check_err $? "backlog $backlog / $limit expected <= 10% distance"
	log_test "TC $((vlan - 10)): RED backlog > limit"

	stop_traffic
+3 −1
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ trap cleanup EXIT

ALL_TESTS="router tc_flower mirror_gre tc_police port"
for current_test in ${TESTS:-$ALL_TESTS}; do
	RET_FIN=0
	source ${current_test}_scale.sh

	num_netifs_var=${current_test^^}_NUM_NETIFS
@@ -48,8 +49,9 @@ for current_test in ${TESTS:-$ALL_TESTS}; do
		else
			log_test "'$current_test' overflow $target"
		fi
		RET_FIN=$(( RET_FIN || RET ))
	done
done
current_test=""

exit "$RET"
exit "$RET_FIN"
+3 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ trap cleanup EXIT

ALL_TESTS="router tc_flower mirror_gre tc_police port"
for current_test in ${TESTS:-$ALL_TESTS}; do
	RET_FIN=0
	source ${current_test}_scale.sh

	num_netifs_var=${current_test^^}_NUM_NETIFS
@@ -50,8 +51,9 @@ for current_test in ${TESTS:-$ALL_TESTS}; do
				log_test "'$current_test' [$profile] overflow $target"
			fi
		done
		RET_FIN=$(( RET_FIN || RET ))
	done
done
current_test=""

exit "$RET"
exit "$RET_FIN"
Loading