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: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
cbf2ec506c
@ -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
|
||||
}
|
||||
|
@ -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)"
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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()
|
||||
|
@ -271,7 +271,7 @@ test_span_gre_fdb_roaming()
|
||||
|
||||
while ((RET == 0)); do
|
||||
bridge fdb del dev $swp3 $h3mac vlan 555 master 2>/dev/null
|
||||
bridge fdb add dev $swp2 $h3mac vlan 555 master
|
||||
bridge fdb add dev $swp2 $h3mac vlan 555 master static
|
||||
sleep 1
|
||||
fail_test_span_gre_dir $tundev ingress
|
||||
|
||||
|
@ -20,6 +20,13 @@ mirror_uninstall()
|
||||
tc filter del dev $swp1 $direction pref 1000
|
||||
}
|
||||
|
||||
is_ipv6()
|
||||
{
|
||||
local addr=$1; shift
|
||||
|
||||
[[ -z ${addr//[0-9a-fA-F:]/} ]]
|
||||
}
|
||||
|
||||
mirror_test()
|
||||
{
|
||||
local vrf_name=$1; shift
|
||||
@ -29,9 +36,17 @@ mirror_test()
|
||||
local pref=$1; shift
|
||||
local expect=$1; shift
|
||||
|
||||
if is_ipv6 $dip; then
|
||||
local proto=-6
|
||||
local type="icmp6 type=128" # Echo request.
|
||||
else
|
||||
local proto=
|
||||
local type="icmp echoreq"
|
||||
fi
|
||||
|
||||
local t0=$(tc_rule_stats_get $dev $pref)
|
||||
$MZ $vrf_name ${sip:+-A $sip} -B $dip -a own -b bc -q \
|
||||
-c 10 -d 100msec -t icmp type=8
|
||||
$MZ $proto $vrf_name ${sip:+-A $sip} -B $dip -a own -b bc -q \
|
||||
-c 10 -d 100msec -t $type
|
||||
sleep 0.5
|
||||
local t1=$(tc_rule_stats_get $dev $pref)
|
||||
local delta=$((t1 - t0))
|
||||
|
Loading…
x
Reference in New Issue
Block a user