Skip to content

Commit 312f2d5

Browse files
committed
Merge branch 'selftests-mlxsw-a-couple-of-fixes'
Ido Schimmel says: ==================== selftests: mlxsw: A couple of fixes Patch #1 fixes a breakage due to a change in iproute2 output. The real problem is not iproute2, but the fact that the check was not strict enough. Fixed by using JSON output instead. Targeting at net so that the test will pass as part of old and new kernels regardless of iproute2 version. Patch #2 fixes an issue uncovered by the first one. ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 10b6bb6 + 196f9bc commit 312f2d5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ for current_test in ${TESTS:-$ALL_TESTS}; do
5050
else
5151
log_test "'$current_test' [$profile] overflow $target"
5252
fi
53+
RET_FIN=$(( RET_FIN || RET ))
5354
done
54-
RET_FIN=$(( RET_FIN || RET ))
5555
done
5656
done
5757
current_test=""

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ __tc_police_test()
6060

6161
tc_police_rules_create $count $should_fail
6262

63-
offload_count=$(tc filter show dev $swp1 ingress | grep in_hw | wc -l)
63+
offload_count=$(tc -j filter show dev $swp1 ingress |
64+
jq "[.[] | select(.options.in_hw == true)] | length")
6465
((offload_count == count))
6566
check_err_fail $should_fail $? "tc police offload count"
6667
}

0 commit comments

Comments
 (0)