This is a loose follow-up to the Kernel CI patchset posted recently. It contains various fixes that were supposed to be part of said patchset, but didn't fit due to its size. The latter 4 patches were written independently of the CI effort, but again didn't fit in their intended patchsets.
- Patch #1 unifies code of two very similar looking functions, busywait() and slowwait().
- Patch #2 adds sanity checks around the setting of NETIFS, which carries list of interfaces to run on.
- Patch #3 changes bail_on_lldpad() to SKIP instead of FAILing.
- Patches #4 to #7 fix issues in selftests.
- Patches #8 to #10 add topology diagrams to several selftests. This should have been part of the mlxsw leg of NH group stats patches, but again, it did not fit in due to size.
Danielle Ratson (1): selftests: mlxsw: ethtool_lanes: Wait for lanes parameter dump explicitly
Petr Machata (9): selftests: net: Unify code of busywait() and slowwait() selftests: forwarding: lib.sh: Validate NETIFS selftests: forwarding: bail_on_lldpad() should SKIP selftests: drivers: hw: Fix ethtool_rmon selftests: drivers: hw: ethtool.sh: Adjust output selftests: drivers: hw: Include tc_common.sh in hw_stats_l3 selftests: forwarding: router_mpath_nh: Add a diagram selftests: forwarding: router_mpath_nh_res: Add a diagram selftests: forwarding: router_nh: Add a diagram
.../selftests/drivers/net/hw/ethtool.sh | 15 +++--- .../selftests/drivers/net/hw/ethtool_rmon.sh | 1 + .../selftests/drivers/net/hw/hw_stats_l3.sh | 1 + .../drivers/net/hw/hw_stats_l3_gre.sh | 1 + .../drivers/net/mlxsw/ethtool_lanes.sh | 14 +++--- tools/testing/selftests/net/forwarding/lib.sh | 49 +++++++++---------- .../net/forwarding/router_mpath_nh.sh | 35 +++++++++++++ .../net/forwarding/router_mpath_nh_res.sh | 35 +++++++++++++ .../selftests/net/forwarding/router_nh.sh | 14 ++++++ tools/testing/selftests/net/lib.sh | 16 ++++-- 10 files changed, 137 insertions(+), 44 deletions(-)
Bodies of busywait() and slowwait() functions are almost identical. Extract the common code into a helper, loopy_wait, and convert busywait() and slowwait() into trivial wrappers.
Moreover, the fact that slowwait() uses seconds for units is really not intuitive, and the comment does not help much. Instead make the unit part of the name of the argument to further clarify what units are expected.
Cc: Hangbin Liu liuhangbin@gmail.com Signed-off-by: Petr Machata petrm@nvidia.com Reviewed-by: Benjamin Poirier bpoirier@nvidia.com --- tools/testing/selftests/net/forwarding/lib.sh | 22 ++----------------- tools/testing/selftests/net/lib.sh | 16 +++++++++++--- 2 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 4103ed7afcde..658e4e7bf4b9 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -95,27 +95,9 @@ source "$net_forwarding_dir/../lib.sh" # timeout in seconds slowwait() { - local timeout=$1; shift + local timeout_sec=$1; shift
- local start_time="$(date -u +%s)" - while true - do - local out - out=$("$@") - local ret=$? - if ((!ret)); then - echo -n "$out" - return 0 - fi - - local current_time="$(date -u +%s)" - if ((current_time - start_time > timeout)); then - echo -n "$out" - return 1 - fi - - sleep 0.1 - done + loopy_wait "sleep 0.1" "$((timeout_sec * 1000))" "$@" }
############################################################################## diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh index b7f7b8695165..c868c0aec121 100644 --- a/tools/testing/selftests/net/lib.sh +++ b/tools/testing/selftests/net/lib.sh @@ -58,9 +58,10 @@ ksft_exit_status_merge() $ksft_xfail $ksft_pass $ksft_skip $ksft_fail }
-busywait() +loopy_wait() { - local timeout=$1; shift + local sleep_cmd=$1; shift + local timeout_ms=$1; shift
local start_time="$(date -u +%s%3N)" while true @@ -74,13 +75,22 @@ busywait() fi
local current_time="$(date -u +%s%3N)" - if ((current_time - start_time > timeout)); then + if ((current_time - start_time > timeout_ms)); then echo -n "$out" return 1 fi + + $sleep_cmd done }
+busywait() +{ + local timeout_ms=$1; shift + + loopy_wait : "$timeout_ms" "$@" +} + cleanup_ns() { local ns=""
On Fri, Apr 12, 2024 at 07:03:04PM +0200, Petr Machata wrote:
Bodies of busywait() and slowwait() functions are almost identical. Extract the common code into a helper, loopy_wait, and convert busywait() and slowwait() into trivial wrappers.
Moreover, the fact that slowwait() uses seconds for units is really not intuitive, and the comment does not help much. Instead make the unit part of the name of the argument to further clarify what units are expected.
Cc: Hangbin Liu liuhangbin@gmail.com Signed-off-by: Petr Machata petrm@nvidia.com Reviewed-by: Benjamin Poirier bpoirier@nvidia.com
tools/testing/selftests/net/forwarding/lib.sh | 22 ++----------------- tools/testing/selftests/net/lib.sh | 16 +++++++++++--- 2 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 4103ed7afcde..658e4e7bf4b9 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -95,27 +95,9 @@ source "$net_forwarding_dir/../lib.sh" # timeout in seconds slowwait() {
- local timeout=$1; shift
- local timeout_sec=$1; shift
- local start_time="$(date -u +%s)"
- while true
- do
local out
out=$("$@")
local ret=$?
if ((!ret)); then
echo -n "$out"
return 0
fi
local current_time="$(date -u +%s)"
if ((current_time - start_time > timeout)); then
echo -n "$out"
return 1
fi
sleep 0.1
- done
- loopy_wait "sleep 0.1" "$((timeout_sec * 1000))" "$@"
} ############################################################################## diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh index b7f7b8695165..c868c0aec121 100644 --- a/tools/testing/selftests/net/lib.sh +++ b/tools/testing/selftests/net/lib.sh @@ -58,9 +58,10 @@ ksft_exit_status_merge() $ksft_xfail $ksft_pass $ksft_skip $ksft_fail } -busywait() +loopy_wait() {
- local timeout=$1; shift
- local sleep_cmd=$1; shift
- local timeout_ms=$1; shift
local start_time="$(date -u +%s%3N)" while true @@ -74,13 +75,22 @@ busywait() fi local current_time="$(date -u +%s%3N)"
if ((current_time - start_time > timeout)); then
fiif ((current_time - start_time > timeout_ms)); then echo -n "$out" return 1
done$sleep_cmd
} +busywait() +{
- local timeout_ms=$1; shift
- loopy_wait : "$timeout_ms" "$@"
+}
cleanup_ns() { local ns="" -- 2.43.0
Reviewed-by: Hangbin Liu liuhangbin@gmail.com
The variable should contain at least NUM_NETIFS interfaces, stored as keys named "p$i", for i in `seq $NUM_NETIFS`.
Signed-off-by: Petr Machata petrm@nvidia.com Reviewed-by: Benjamin Poirier bpoirier@nvidia.com --- tools/testing/selftests/net/forwarding/lib.sh | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 658e4e7bf4b9..3cbbc2fd4d7d 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -273,11 +273,6 @@ if [[ "$REQUIRE_MTOOLS" = "yes" ]]; then require_command mreceive fi
-if [[ ! -v NUM_NETIFS ]]; then - echo "SKIP: importer does not define "NUM_NETIFS"" - exit $ksft_skip -fi - ############################################################################## # Command line options handling
@@ -296,6 +291,23 @@ done ############################################################################## # Network interfaces configuration
+if [[ ! -v NUM_NETIFS ]]; then + echo "SKIP: importer does not define "NUM_NETIFS"" + exit $ksft_skip +fi + +if (( NUM_NETIFS > ${#NETIFS[@]} )); then + echo "SKIP: Importer requires $NUM_NETIFS NETIFS, but only ${#NETIFS[@]} are defined (${NETIFS[@]})" + exit $ksft_skip +fi + +for i in $(seq ${#NETIFS[@]}); do + if [[ ! ${NETIFS[p$i]} ]]; then + echo "SKIP: NETIFS[p$i] not given" + exit $ksft_skip + fi +done + create_netif_veth() { local i
On Fri, Apr 12, 2024 at 07:03:05PM +0200, Petr Machata wrote:
The variable should contain at least NUM_NETIFS interfaces, stored as keys named "p$i", for i in `seq $NUM_NETIFS`.
Signed-off-by: Petr Machata petrm@nvidia.com Reviewed-by: Benjamin Poirier bpoirier@nvidia.com
tools/testing/selftests/net/forwarding/lib.sh | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 658e4e7bf4b9..3cbbc2fd4d7d 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -273,11 +273,6 @@ if [[ "$REQUIRE_MTOOLS" = "yes" ]]; then require_command mreceive fi -if [[ ! -v NUM_NETIFS ]]; then
- echo "SKIP: importer does not define "NUM_NETIFS""
- exit $ksft_skip
-fi
############################################################################## # Command line options handling @@ -296,6 +291,23 @@ done ############################################################################## # Network interfaces configuration +if [[ ! -v NUM_NETIFS ]]; then
- echo "SKIP: importer does not define "NUM_NETIFS""
- exit $ksft_skip
+fi
+if (( NUM_NETIFS > ${#NETIFS[@]} )); then
- echo "SKIP: Importer requires $NUM_NETIFS NETIFS, but only ${#NETIFS[@]} are defined (${NETIFS[@]})"
- exit $ksft_skip
+fi
+for i in $(seq ${#NETIFS[@]}); do
- if [[ ! ${NETIFS[p$i]} ]]; then
echo "SKIP: NETIFS[p$i] not given"
exit $ksft_skip
- fi
+done
create_netif_veth() { local i -- 2.43.0
Reviewed-by: Hangbin Liu liuhangbin@gmail.com
$ksft_skip is used to mark selftests that have tooling issues. The fact that LLDPad is running, but shouldn't, is one such issue. Therefore have bail_on_lldpad() bail with $ksft_skip.
Signed-off-by: Petr Machata petrm@nvidia.com Reviewed-by: Benjamin Poirier bpoirier@nvidia.com --- tools/testing/selftests/net/forwarding/lib.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 3cbbc2fd4d7d..7913c6ee418d 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -2138,6 +2138,8 @@ bail_on_lldpad() { local reason1="$1"; shift local reason2="$1"; shift + local caller=${FUNCNAME[1]} + local src=${BASH_SOURCE[1]}
if systemctl is-active --quiet lldpad; then
@@ -2158,7 +2160,8 @@ bail_on_lldpad() an environment variable ALLOW_LLDPAD to a non-empty string. EOF - exit 1 + log_test_skip $src:$caller + exit $EXIT_STATUS else return fi
On Fri, Apr 12, 2024 at 07:03:06PM +0200, Petr Machata wrote:
$ksft_skip is used to mark selftests that have tooling issues. The fact that LLDPad is running, but shouldn't, is one such issue. Therefore have bail_on_lldpad() bail with $ksft_skip.
Signed-off-by: Petr Machata petrm@nvidia.com Reviewed-by: Benjamin Poirier bpoirier@nvidia.com
tools/testing/selftests/net/forwarding/lib.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 3cbbc2fd4d7d..7913c6ee418d 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -2138,6 +2138,8 @@ bail_on_lldpad() { local reason1="$1"; shift local reason2="$1"; shift
- local caller=${FUNCNAME[1]}
- local src=${BASH_SOURCE[1]}
if systemctl is-active --quiet lldpad; then @@ -2158,7 +2160,8 @@ bail_on_lldpad() an environment variable ALLOW_LLDPAD to a non-empty string. EOF
exit 1
log_test_skip $src:$caller
else return fiexit $EXIT_STATUS
-- 2.43.0
Reviewed-by: Hangbin Liu liuhangbin@gmail.com
When rx-pktsNtoM reports a range that involves very low-valued range, such as 0-64, the calculated length of the packet will be -4, because FCS is subtracted from the value. mausezahn then confuses the value for an option and bails out. As a result, the test dumps many mausezahn error messages.
Instead, cap the value at 0. mausezahn will use an appropriate minimum packet length.
Cc: Vladimir Oltean vladimir.oltean@nxp.com Cc: Tobias Waldekranz tobias@waldekranz.com Signed-off-by: Petr Machata petrm@nvidia.com --- tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh b/tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh index e2a1c10d3503..8f60c1685ad4 100755 --- a/tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh +++ b/tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh @@ -44,6 +44,7 @@ bucket_test() # Mausezahn does not include FCS bytes in its length - but the # histogram counters do len=$((len - ETH_FCS_LEN)) + len=$((len > 0 ? len : 0))
before=$(ethtool --json -S $iface --groups rmon | \ jq -r ".[0].rmon["${set}-pktsNtoM"][$bucket].val")
Some log_test calls are done in a loop, and lead to the same log output. This might prove tricky to deduplicate for automated tools. Instead, roll the unique information from log_info to log_test, and drop the log_info. This also leads to more compact and clearer output.
This change prompts rewording the messages so that they are not excessively long.
Some check_err messages do not indicate what the issue actually is, so reword them to say it's a "ping with", like is the case in some other instances in this test.
Signed-off-by: Petr Machata petrm@nvidia.com --- tools/testing/selftests/drivers/net/hw/ethtool.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/hw/ethtool.sh b/tools/testing/selftests/drivers/net/hw/ethtool.sh index bb12d5d70949..fa6953de6b6d 100755 --- a/tools/testing/selftests/drivers/net/hw/ethtool.sh +++ b/tools/testing/selftests/drivers/net/hw/ethtool.sh @@ -65,9 +65,8 @@ same_speeds_autoneg_off() setup_wait_dev_with_timeout $h1 setup_wait_dev_with_timeout $h2 ping_do $h1 192.0.2.2 - check_err $? "speed $speed autoneg off" - log_test "force of same speed autoneg off" - log_info "speed = $speed" + check_err $? "ping with speed $speed autoneg off" + log_test "force speed $speed on both ends" done
ethtool -s $h2 autoneg on @@ -112,9 +111,8 @@ combination_of_neg_on_and_off() setup_wait_dev_with_timeout $h1 setup_wait_dev_with_timeout $h2 ping_do $h1 192.0.2.2 - check_err $? "h1-speed=$speed autoneg off, h2 autoneg on" - log_test "one side with autoneg off and another with autoneg on" - log_info "force speed = $speed" + check_err $? "ping with h1-speed=$speed autoneg off, h2 autoneg on" + log_test "force speed $speed vs. autoneg" done
ethtool -s $h1 autoneg on @@ -207,10 +205,9 @@ advertise_subset_of_speeds() setup_wait_dev_with_timeout $h1 setup_wait_dev_with_timeout $h2 ping_do $h1 192.0.2.2 - check_err $? "h1=$speed_1_to_advertise, h2=$speed_2_to_advertise ($speed_value)" + check_err $? "ping with h1=$speed_1_to_advertise, h2=$speed_2_to_advertise ($speed_value)"
- log_test "advertise subset of speeds" - log_info "h1=$speed_1_to_advertise, h2=$speed_2_to_advertise" + log_test "advertise $speed_1_to_advertise vs. $speed_2_to_advertise" done
ethtool -s $h2 autoneg on
The tests use the constant TC_HIT_TIMEOUT when waiting on the counter values. However it does not include tc_common.sh where the counter is specified. The test has been robust in our testing, which means the counter is bumped quickly enough that the updated value is available already on the first iteration. Nevertheless it's not correct. Include tc_common.sh as appropriate.
Signed-off-by: Petr Machata petrm@nvidia.com --- tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh | 1 + tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh | 1 + 2 files changed, 2 insertions(+)
diff --git a/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh b/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh index 7dfc50366c99..67fafefc80be 100755 --- a/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh +++ b/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh @@ -50,6 +50,7 @@ ALL_TESTS=" NUM_NETIFS=4 lib_dir=$(dirname "$0") source "$lib_dir"/../../../net/forwarding/lib.sh +source "$lib_dir"/../../../net/forwarding/tc_common.sh
h1_create() { diff --git a/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh b/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh index ab8d04855af5..a94d92e1abce 100755 --- a/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh +++ b/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh @@ -15,6 +15,7 @@ NUM_NETIFS=6 lib_dir=$(dirname "$0") source "$lib_dir"/../../../net/forwarding/lib.sh source "$lib_dir"/../../../net/forwarding/ipip_lib.sh +source "$lib_dir"/../../../net/forwarding/tc_common.sh
setup_prepare() {
From: Danielle Ratson danieller@nvidia.com
The ethtool dump includes the lanes parameter only when the port is up. Therefore, the ethtool_lanes.sh test waits for ports to come before testing the lanes parameter.
In some cases, the test considers the port as up, but the lanes parameter is not yet dumped although assumed to be, resulting in ethtool_lanes.sh test failure.
To avoid that, ensure that the lanes parameter is indeed dumped by waiting for it explicitly, before preforming the test cases.
Signed-off-by: Danielle Ratson danieller@nvidia.com Reviewed-by: Petr Machata petrm@nvidia.com Signed-off-by: Petr Machata petrm@nvidia.com --- .../selftests/drivers/net/mlxsw/ethtool_lanes.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh b/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh index 91891b9418d7..877cd6df94a1 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh @@ -24,8 +24,8 @@ setup_prepare() busywait "$TIMEOUT" wait_for_port_up ethtool $swp2 check_err $? "ports did not come up"
- local lanes_exist=$(ethtool $swp1 | grep 'Lanes:') - if [[ -z $lanes_exist ]]; then + busywait $TIMEOUT sh -c "ethtool $swp1 | grep -q Lanes:" + if [[ $? -ne 0 ]]; then log_test "SKIP: driver does not support lanes setting" exit 1 fi @@ -122,8 +122,9 @@ autoneg() ethtool_set $swp1 speed $max_speed lanes $lanes ip link set dev $swp1 up ip link set dev $swp2 up - busywait "$TIMEOUT" wait_for_port_up ethtool $swp2 - check_err $? "ports did not come up" + + busywait $TIMEOUT sh -c "ethtool $swp1 | grep -q Lanes:" + check_err $? "Lanes parameter is not presented on time"
check_lanes $swp1 $lanes $max_speed log_test "$lanes lanes is autonegotiated" @@ -160,8 +161,9 @@ autoneg_force_mode() ethtool_set $swp2 speed $max_speed lanes $lanes autoneg off ip link set dev $swp1 up ip link set dev $swp2 up - busywait "$TIMEOUT" wait_for_port_up ethtool $swp2 - check_err $? "ports did not come up" + + busywait $TIMEOUT sh -c "ethtool $swp1 | grep -q Lanes:" + check_err $? "Lanes parameter is not presented on time"
check_lanes $swp1 $lanes $max_speed log_test "Autoneg off, $lanes lanes detected during force mode"
This test lacks a topology diagram, making the setup not obvious. Add one.
Cc: David Ahern dsahern@gmail.com Signed-off-by: Petr Machata petrm@nvidia.com --- .../net/forwarding/router_mpath_nh.sh | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh index 3f0f5dc95542..2ba44247c60a 100755 --- a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh +++ b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh @@ -1,6 +1,41 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0
+# +-------------------------+ +# | H1 | +# | $h1 + | +# | 192.0.2.2/24 | | +# | 2001:db8:1::2/64 | | +# +-------------------|-----+ +# | +# +-------------------|----------------------+ +# | | R1 | +# | $rp11 + | +# | 192.0.2.1/24 | +# | 2001:db8:1::1/64 | +# | | +# | + $rp12 + $rp13 | +# | | 169.254.2.12/24 | 169.254.3.13/24 | +# | | fe80:2::12/64 | fe80:3::13/64 | +# +--|--------------------|------------------+ +# | | +# +--|--------------------|------------------+ +# | + $rp22 + $rp23 | +# | 169.254.2.22/24 169.254.3.23/24 | +# | fe80:2::22/64 fe80:3::23/64 | +# | | +# | $rp21 + | +# | 198.51.100.1/24 | | +# | 2001:db8:2::1/64 | R2 | +# +-------------------|----------------------+ +# | +# +-------------------|-----+ +# | | | +# | $h2 + | +# | 198.51.100.2/24 | +# | 2001:db8:2::2/64 H2 | +# +-------------------------+ + ALL_TESTS=" ping_ipv4 ping_ipv6
On Fri, Apr 12, 2024 at 07:03:11PM +0200, Petr Machata wrote:
This test lacks a topology diagram, making the setup not obvious. Add one.
Cc: David Ahern dsahern@gmail.com Signed-off-by: Petr Machata petrm@nvidia.com
.../net/forwarding/router_mpath_nh.sh | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh index 3f0f5dc95542..2ba44247c60a 100755 --- a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh +++ b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh @@ -1,6 +1,41 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +# +-------------------------+ +# | H1 | +# | $h1 + | +# | 192.0.2.2/24 | | +# | 2001:db8:1::2/64 | | +# +-------------------|-----+ +# | +# +-------------------|----------------------+ +# | | R1 | +# | $rp11 + | +# | 192.0.2.1/24 | +# | 2001:db8:1::1/64 | +# | | +# | + $rp12 + $rp13 | +# | | 169.254.2.12/24 | 169.254.3.13/24 | +# | | fe80:2::12/64 | fe80:3::13/64 | +# +--|--------------------|------------------+ +# | | +# +--|--------------------|------------------+ +# | + $rp22 + $rp23 | +# | 169.254.2.22/24 169.254.3.23/24 | +# | fe80:2::22/64 fe80:3::23/64 | +# | | +# | $rp21 + | +# | 198.51.100.1/24 | | +# | 2001:db8:2::1/64 | R2 | +# +-------------------|----------------------+ +# | +# +-------------------|-----+ +# | | | +# | $h2 + | +# | 198.51.100.2/24 | +# | 2001:db8:2::2/64 H2 | +# +-------------------------+
ALL_TESTS=" ping_ipv4 ping_ipv6 -- 2.43.0
Reviewed-by: Hangbin Liu liuhangbin@gmail.com
On 4/12/24 11:03 AM, Petr Machata wrote:
This test lacks a topology diagram, making the setup not obvious. Add one.
Cc: David Ahern dsahern@gmail.com Signed-off-by: Petr Machata petrm@nvidia.com
.../net/forwarding/router_mpath_nh.sh | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+)
Reviewed-by: David Ahern dsahern@kernel.org
This test lacks a topology diagram, making the setup not obvious. Add one.
Signed-off-by: Petr Machata petrm@nvidia.com --- .../net/forwarding/router_mpath_nh_res.sh | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh index 4b483d24ad00..cd9e346436fc 100755 --- a/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh +++ b/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh @@ -1,6 +1,41 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0
+# +-------------------------+ +# | H1 | +# | $h1 + | +# | 192.0.2.2/24 | | +# | 2001:db8:1::2/64 | | +# +-------------------|-----+ +# | +# +-------------------|----------------------+ +# | | R1 | +# | $rp11 + | +# | 192.0.2.1/24 | +# | 2001:db8:1::1/64 | +# | | +# | + $rp12 + $rp13 | +# | | 169.254.2.12/24 | 169.254.3.13/24 | +# | | fe80:2::12/64 | fe80:3::13/64 | +# +--|--------------------|------------------+ +# | | +# +--|--------------------|------------------+ +# | + $rp22 + $rp23 | +# | 169.254.2.22/24 169.254.3.23/24 | +# | fe80:2::22/64 fe80:3::23/64 | +# | | +# | $rp21 + | +# | 198.51.100.1/24 | | +# | 2001:db8:2::1/64 | R2 | +# +-------------------|----------------------+ +# | +# +-------------------|-----+ +# | | | +# | $h2 + | +# | 198.51.100.2/24 | +# | 2001:db8:2::2/64 H2 | +# +-------------------------+ + ALL_TESTS=" ping_ipv4 ping_ipv6
On Fri, Apr 12, 2024 at 07:03:12PM +0200, Petr Machata wrote:
This test lacks a topology diagram, making the setup not obvious. Add one.
Signed-off-by: Petr Machata petrm@nvidia.com
.../net/forwarding/router_mpath_nh_res.sh | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh index 4b483d24ad00..cd9e346436fc 100755 --- a/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh +++ b/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh @@ -1,6 +1,41 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +# +-------------------------+ +# | H1 | +# | $h1 + | +# | 192.0.2.2/24 | | +# | 2001:db8:1::2/64 | | +# +-------------------|-----+ +# | +# +-------------------|----------------------+ +# | | R1 | +# | $rp11 + | +# | 192.0.2.1/24 | +# | 2001:db8:1::1/64 | +# | | +# | + $rp12 + $rp13 | +# | | 169.254.2.12/24 | 169.254.3.13/24 | +# | | fe80:2::12/64 | fe80:3::13/64 | +# +--|--------------------|------------------+ +# | | +# +--|--------------------|------------------+ +# | + $rp22 + $rp23 | +# | 169.254.2.22/24 169.254.3.23/24 | +# | fe80:2::22/64 fe80:3::23/64 | +# | | +# | $rp21 + | +# | 198.51.100.1/24 | | +# | 2001:db8:2::1/64 | R2 | +# +-------------------|----------------------+ +# | +# +-------------------|-----+ +# | | | +# | $h2 + | +# | 198.51.100.2/24 | +# | 2001:db8:2::2/64 H2 | +# +-------------------------+
ALL_TESTS=" ping_ipv4 ping_ipv6 -- 2.43.0
Reviewed-by: Hangbin Liu liuhangbin@gmail.com
This test lacks a topology diagram, making the setup not obvious. Add one.
Signed-off-by: Petr Machata petrm@nvidia.com --- .../testing/selftests/net/forwarding/router_nh.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/router_nh.sh b/tools/testing/selftests/net/forwarding/router_nh.sh index f3a53738bdcc..92904b01eae9 100755 --- a/tools/testing/selftests/net/forwarding/router_nh.sh +++ b/tools/testing/selftests/net/forwarding/router_nh.sh @@ -1,6 +1,20 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0
+# +-------------------------+ +-------------------------+ +# | H1 | | H2 | +# | $h1 + | | $h2 + | +# | 192.0.2.2/24 | | | 198.51.100.2/24 | | +# | 2001:db8:1::2/64 | | | 2001:db8:2::2/64 | | +# +-------------------|-----+ +-------------------|-----+ +# | | +# +-------------------|----------------------------|-----+ +# | R1 | | | +# | $rp1 + $rp2 + | +# | 192.0.2.1/24 198.51.100.1/24 | +# | 2001:db8:1::1/64 2001:db8:2::1/64 | +# +------------------------------------------------------+ + ALL_TESTS=" ping_ipv4 ping_ipv6
On Fri, Apr 12, 2024 at 07:03:13PM +0200, Petr Machata wrote:
This test lacks a topology diagram, making the setup not obvious. Add one.
Signed-off-by: Petr Machata petrm@nvidia.com
.../testing/selftests/net/forwarding/router_nh.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/router_nh.sh b/tools/testing/selftests/net/forwarding/router_nh.sh index f3a53738bdcc..92904b01eae9 100755 --- a/tools/testing/selftests/net/forwarding/router_nh.sh +++ b/tools/testing/selftests/net/forwarding/router_nh.sh @@ -1,6 +1,20 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +# +-------------------------+ +-------------------------+ +# | H1 | | H2 | +# | $h1 + | | $h2 + | +# | 192.0.2.2/24 | | | 198.51.100.2/24 | | +# | 2001:db8:1::2/64 | | | 2001:db8:2::2/64 | | +# +-------------------|-----+ +-------------------|-----+ +# | | +# +-------------------|----------------------------|-----+ +# | R1 | | | +# | $rp1 + $rp2 + | +# | 192.0.2.1/24 198.51.100.1/24 | +# | 2001:db8:1::1/64 2001:db8:2::1/64 | +# +------------------------------------------------------+
ALL_TESTS=" ping_ipv4 ping_ipv6 -- 2.43.0
Reviewed-by: Hangbin Liu liuhangbin@gmail.com
Hello:
This series was applied to netdev/net-next.git (main) by Paolo Abeni pabeni@redhat.com:
On Fri, 12 Apr 2024 19:03:03 +0200 you wrote:
This is a loose follow-up to the Kernel CI patchset posted recently. It contains various fixes that were supposed to be part of said patchset, but didn't fit due to its size. The latter 4 patches were written independently of the CI effort, but again didn't fit in their intended patchsets.
- Patch #1 unifies code of two very similar looking functions, busywait() and slowwait().
[...]
Here is the summary with links: - [net-next,01/10] selftests: net: Unify code of busywait() and slowwait() https://git.kernel.org/netdev/net-next/c/a4022a332f43 - [net-next,02/10] selftests: forwarding: lib.sh: Validate NETIFS https://git.kernel.org/netdev/net-next/c/2291752fae3d - [net-next,03/10] selftests: forwarding: bail_on_lldpad() should SKIP https://git.kernel.org/netdev/net-next/c/492976136bb9 - [net-next,04/10] selftests: drivers: hw: Fix ethtool_rmon https://git.kernel.org/netdev/net-next/c/042db639bf33 - [net-next,05/10] selftests: drivers: hw: ethtool.sh: Adjust output https://git.kernel.org/netdev/net-next/c/f359d44a4e83 - [net-next,06/10] selftests: drivers: hw: Include tc_common.sh in hw_stats_l3 https://git.kernel.org/netdev/net-next/c/bfc42940682b - [net-next,07/10] selftests: mlxsw: ethtool_lanes: Wait for lanes parameter dump explicitly https://git.kernel.org/netdev/net-next/c/8d612ed4b554 - [net-next,08/10] selftests: forwarding: router_mpath_nh: Add a diagram https://git.kernel.org/netdev/net-next/c/ba7d1e99b193 - [net-next,09/10] selftests: forwarding: router_mpath_nh_res: Add a diagram https://git.kernel.org/netdev/net-next/c/b51a94b2d59d - [net-next,10/10] selftests: forwarding: router_nh: Add a diagram https://git.kernel.org/netdev/net-next/c/74ddac073cfe
You are awesome, thank you!
linux-kselftest-mirror@lists.linaro.org