selftests/net/forwarding: configurable seed tests
Subsystems (5)
PATCH v5 3/3 selftests/net/forwarding: configurable seed tests
Test equal and different seed values for IPv4/IPv6 multipath routing.
Signed-off-by Balaev Pavel <[email protected]>
--- .../testing/selftests/net/forwarding/Makefile | 1 + tools/testing/selftests/net/forwarding/lib.sh | 28 ++ .../net/forwarding/router_mpath_seed.sh | 347 ++++++++++++++++++ 3 files changed, 376 insertions(+) create mode 100755 tools/testing/selftests/net/forwarding/router_mpath_seed.sh
tools/testing/selftests/net/forwarding/Makefile +1 -0
@@ -38,6 +38,7 @@ TEST_PROGS = bridge_igmp.sh \ router_mpath_nh.sh \ router_multicast.sh \ router_multipath.sh \ + router_mpath_seed.sh \ router.sh \ router_vid_1.sh \ sch_ets.sh \
tools/testing/selftests/net/forwarding/lib.sh +28 -0
@@ -10,6 +10,7 @@ PING6=${PING6:=ping6} MZ=${MZ:=mausezahn} ARPING=${ARPING:=arping} TEAMD=${TEAMD:=teamd} +OPENSSL=${OPENSSL:=openssl} WAIT_TIME=${WAIT_TIME:=5} PAUSE_ON_FAIL=${PAUSE_ON_FAIL:=no} PAUSE_ON_CLEANUP=${PAUSE_ON_CLEANUP:=no}
@@ -698,6 +699,33 @@ link_stats_rx_errors_get() link_stats_get $1 rx errors } +ns_link_stats_get() +{ + local netns=$1; shift + local if_name=$1; shift + local dir=$1; shift + local stat=$1; shift + + ip netns exec $netns ip -j -s link show dev $if_name \ + | jq '.[]["stats64"]["'$dir'"]["'$stat'"]' +} + +ns_link_stats_tx_packets_get() +{ + local netns=$1; shift + local if_name=$1; shift + + ns_link_stats_get $netns $if_name tx packets +} + +ns_link_stats_rx_errors_get() +{ + local netns=$1; shift + local if_name=$1; shift + + ns_link_stats_get $netns $if_name rx errors +} + tc_rule_stats_get() { local dev=$1; shift
tools/testing/selftests/net/forwarding/router_mpath_seed.sh new file +347 -0
347 lines not on this page · raw message
Signature · 1 line
2.31.1