Commit 0c499a35 authored by Petr Machata's avatar Petr Machata Committed by Jakub Kicinski
Browse files

selftests: forwarding: Ditch skip_on_veth()



Since the selftests that are not supposed to run on veth pairs are now in
their own dedicated directory, the skip_on_veth logic can go away. Drop it
from the selftests, and from lib.sh.

Cc: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
Link: https://lore.kernel.org/r/63b470e10d65270571ee7de709b31672ce314872.1711464583.git.petrm@nvidia.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 40d269c0
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -287,8 +287,6 @@ different_speeds_autoneg_on()
	ethtool -s $h1 autoneg on
}

skip_on_veth

trap cleanup EXIT

setup_prepare
+0 −2
Original line number Diff line number Diff line
@@ -109,8 +109,6 @@ no_cable()
	ip link set dev $swp3 down
}

skip_on_veth

setup_prepare

tests_run
+4 −12
Original line number Diff line number Diff line
@@ -325,17 +325,9 @@ setup_wait

used=$(ip -j stats show dev $rp1.200 group offload subgroup hw_stats_info |
	   jq '.[].info.l3_stats.used')
kind=$(ip -j -d link show dev $rp1 |
	   jq -r '.[].linkinfo.info_kind')
if [[ $used != true ]]; then
	if [[ $kind == veth ]]; then
		log_test_skip "l3_stats not offloaded on veth interface"
		EXIT_STATUS=$ksft_skip
	else
		RET=1 log_test "l3_stats not offloaded"
	fi
else
[[ $used = true ]]
check_err $? "hw_stats_info.used=$used"
log_test "l3_stats offloaded"
tests_run
fi

exit $EXIT_STATUS
+0 −2
Original line number Diff line number Diff line
@@ -100,8 +100,6 @@ test_stats_rx()
	test_stats g2a rx
}

skip_on_veth

trap cleanup EXIT

setup_prepare
+0 −11
Original line number Diff line number Diff line
@@ -254,17 +254,6 @@ 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