Skip to contentSkip to conversation

selftests: Assortment of fixes

PATCH Applied Petr Machata 4 participants 19 messages Apr 12, 2024 – Apr 16, 2024

Subsystems (7)
lore
Share & tools
lore

Petr Machata

author maintainer
#0 lore raw

cover selftests: Assortment of fixes

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(-)
Signature · 1 line
2.43.0
author maintainer
#1 lore raw

PATCH 1/10 selftests: net: Unify code of busywait() and slowwait()

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.

---
 tools/testing/selftests/net/forwarding/lib.sh | 22 ++-----------------
 tools/testing/selftests/net/lib.sh            | 16 +++++++++++---
 2 files changed, 15 insertions(+), 23 deletions(-)
tools/testing/selftests/net/forwarding/lib.sh +2 -20
index 4103ed7afcde..658e4e7bf4b9 100644
@@ -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))" "$@"
 }
 
 ##############################################################################
tools/testing/selftests/net/lib.sh +13 -3
index b7f7b8695165..c868c0aec121 100644
@@ -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=""
Signature · 1 line
2.43.0
Reviewed-by on v1 1/10
#2 lore raw

Re: [PATCH net-next 01/10] selftests: net: Unify code of busywait() and slowwait()

Quoted 94 lines · Petr Machata

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.

---
 tools/testing/selftests/net/forwarding/lib.sh | 22 ++-----------------
 tools/testing/selftests/net/lib.sh            | 16 +++++++++++---
 2 files changed, 15 insertions(+), 23 deletions(-)
tools/testing/selftests/net/forwarding/lib.sh +2 -20
index 4103ed7afcde..658e4e7bf4b9 100644
@@ -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))" "$@"
 }
 
 ##############################################################################
tools/testing/selftests/net/lib.sh +13 -3
index b7f7b8695165..c868c0aec121 100644
@@ -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=""
Signature · 1 line
2.43.0
author maintainer
#3 lore raw

PATCH 2/10 selftests: forwarding: lib.sh: Validate NETIFS

In reply to Petr Machata

The variable should contain at least NUM_NETIFS interfaces, stored as keys named "p$i", for i in seq $NUM_NETIFS.

---
 tools/testing/selftests/net/forwarding/lib.sh | 22 ++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)
tools/testing/selftests/net/forwarding/lib.sh +17 -5
index 658e4e7bf4b9..3cbbc2fd4d7d 100644
@@ -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
Signature · 1 line
2.43.0
Reviewed-by on v1 2/10
#4 lore raw

Re: [PATCH net-next 02/10] selftests: forwarding: lib.sh: Validate NETIFS

Quoted 52 lines · Petr Machata

The variable should contain at least NUM_NETIFS interfaces, stored as keys named "p$i", for i in seq $NUM_NETIFS.

---
 tools/testing/selftests/net/forwarding/lib.sh | 22 ++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)
tools/testing/selftests/net/forwarding/lib.sh +17 -5
index 658e4e7bf4b9..3cbbc2fd4d7d 100644
@@ -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
Signature · 1 line
2.43.0
author maintainer
#5 lore raw

PATCH 3/10 selftests: forwarding: bail_on_lldpad() should SKIP

In reply to Petr Machata

$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.

---
 tools/testing/selftests/net/forwarding/lib.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tools/testing/selftests/net/forwarding/lib.sh +4 -1
index 3cbbc2fd4d7d..7913c6ee418d 100644
@@ -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
Signature · 1 line
2.43.0
Reviewed-by on v1 3/10
#6 lore raw

Re: [PATCH net-next 03/10] selftests: forwarding: bail_on_lldpad() should SKIP

Quoted 36 lines · Petr Machata

$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.

---
 tools/testing/selftests/net/forwarding/lib.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tools/testing/selftests/net/forwarding/lib.sh +4 -1
index 3cbbc2fd4d7d..7913c6ee418d 100644
@@ -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
Signature · 1 line
2.43.0
author maintainer
#7 lore raw

PATCH 4/10 selftests: drivers: hw: Fix ethtool_rmon

In reply to Petr Machata

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 <[email protected]>
Cc Tobias Waldekranz <[email protected]>
---
 tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh +1 -0
index e2a1c10d3503..8f60c1685ad4 100755
@@ -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")
Signature · 1 line
2.43.0
author maintainer
#8 lore raw

PATCH 5/10 selftests: drivers: hw: ethtool.sh: Adjust output

In reply to Petr Machata

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.

---
 tools/testing/selftests/drivers/net/hw/ethtool.sh | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
tools/testing/selftests/drivers/net/hw/ethtool.sh +6 -9
index bb12d5d70949..fa6953de6b6d 100755
@@ -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
Signature · 1 line
2.43.0
author maintainer
#9 lore raw

PATCH 6/10 selftests: drivers: hw: Include tc_common.sh in hw_stats_l3

In reply to Petr Machata

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.

---
 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(+)
tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh +1 -0
index 7dfc50366c99..67fafefc80be 100755
@@ -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()
 {
tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh +1 -0
index ab8d04855af5..a94d92e1abce 100755
@@ -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()
 {
Signature · 1 line
2.43.0
author maintainer
#10 lore raw

PATCH 7/10 selftests: mlxsw: ethtool_lanes: Wait for lanes parameter dump explicitly

In reply to Petr Machata

From: Danielle Ratson <[email protected]>

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.

---
 .../selftests/drivers/net/mlxsw/ethtool_lanes.sh   | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh +8 -6
index 91891b9418d7..877cd6df94a1 100755
@@ -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"
Signature · 1 line
2.43.0
author maintainer
#11 lore raw

PATCH 8/10 selftests: forwarding: router_mpath_nh: Add a diagram

In reply to Petr Machata

This test lacks a topology diagram, making the setup not obvious. Add one.

---
 .../net/forwarding/router_mpath_nh.sh         | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
tools/testing/selftests/net/forwarding/router_mpath_nh.sh +35 -0
index 3f0f5dc95542..2ba44247c60a 100755
@@ -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
Signature · 1 line
2.43.0
Reviewed-by on v1 8/10
#12 lore raw

Re: [PATCH net-next 08/10] selftests: forwarding: router_mpath_nh: Add a diagram

Quoted 58 lines · Petr Machata

This test lacks a topology diagram, making the setup not obvious. Add one.

---
 .../net/forwarding/router_mpath_nh.sh         | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
tools/testing/selftests/net/forwarding/router_mpath_nh.sh +35 -0
index 3f0f5dc95542..2ba44247c60a 100755
@@ -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
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 8/10
#13 lore raw

Re: [PATCH net-next 08/10] selftests: forwarding: router_mpath_nh: Add a diagram

In reply to Petr Machata
Quoted 9 lines · Petr Machata

This test lacks a topology diagram, making the setup not obvious. Add one.

---
 .../net/forwarding/router_mpath_nh.sh         | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
author maintainer
#14 lore raw

PATCH 9/10 selftests: forwarding: router_mpath_nh_res: Add a diagram

In reply to Petr Machata

This test lacks a topology diagram, making the setup not obvious. Add one.

---
 .../net/forwarding/router_mpath_nh_res.sh     | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh +35 -0
index 4b483d24ad00..cd9e346436fc 100755
@@ -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
Signature · 1 line
2.43.0
Reviewed-by on v1 9/10
#15 lore raw

Re: [PATCH net-next 09/10] selftests: forwarding: router_mpath_nh_res: Add a diagram

Quoted 57 lines · Petr Machata

This test lacks a topology diagram, making the setup not obvious. Add one.

---
 .../net/forwarding/router_mpath_nh_res.sh     | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh +35 -0
index 4b483d24ad00..cd9e346436fc 100755
@@ -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
Signature · 1 line
2.43.0
author maintainer
#16 lore raw

PATCH 10/10 selftests: forwarding: router_nh: Add a diagram

In reply to Petr Machata

This test lacks a topology diagram, making the setup not obvious. Add one.

---
 .../testing/selftests/net/forwarding/router_nh.sh  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
tools/testing/selftests/net/forwarding/router_nh.sh +14 -0
index f3a53738bdcc..92904b01eae9 100755
@@ -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
Signature · 1 line
2.43.0
Reviewed-by on v1 10/10
#17 lore raw

Re: [PATCH net-next 10/10] selftests: forwarding: router_nh: Add a diagram

Quoted 36 lines · Petr Machata

This test lacks a topology diagram, making the setup not obvious. Add one.

---
 .../testing/selftests/net/forwarding/router_nh.sh  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
tools/testing/selftests/net/forwarding/router_nh.sh +14 -0
index f3a53738bdcc..92904b01eae9 100755
@@ -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
Signature · 1 line
2.43.0
#18 lore raw
In reply to Petr Machata
This series was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 9 lines · 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html