mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-24 11:25:43 +00:00
selftests: forwarding: Add a helper to skip test when using veth pairs
commit66e131861a
upstream. A handful of tests require physical loopbacks to be used instead of veth pairs. Add a helper that these tests will invoke in order to be skipped when executed with veth pairs. Fixes:64916b57c0
("selftests: forwarding: Add speed and auto-negotiation test") Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Tested-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr> Reviewed-by: Hangbin Liu <liuhangbin@gmail.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://lore.kernel.org/r/20230808141503.4060661-7-idosch@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0b1745accf
commit
f00c016b0a
1 changed files with 11 additions and 0 deletions
|
@ -164,6 +164,17 @@ check_port_mab_support()
|
|||
fi
|
||||
}
|
||||
|
||||
skip_on_veth()
|
||||
{
|
||||
local kind=$(ip -j -d link show dev ${NETIFS[p1]} |
|
||||
jq -r '.[].linkinfo.info_kind')
|
||||
|
||||
if [[ $kind == veth ]]; then
|
||||
echo "SKIP: Test cannot be run with veth pairs"
|
||||
exit $ksft_skip
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ "$(id -u)" -ne 0 ]]; then
|
||||
echo "SKIP: need root privileges"
|
||||
exit $ksft_skip
|
||||
|
|
Loading…
Reference in a new issue