diff mbox series

[net-next] selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses

Message ID 20240603093322.3150030-1-lukma@denx.de
State New
Headers show
Series [net-next] selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses | expand

Commit Message

Lukasz Majewski June 3, 2024, 9:33 a.m. UTC
Fixed MAC addresses help with debugging as last four bytes identify the
network namespace.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
 tools/testing/selftests/net/hsr/hsr_ping.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Jakub Kicinski June 6, 2024, 2:27 a.m. UTC | #1
On Mon,  3 Jun 2024 11:33:22 +0200 Lukasz Majewski wrote:
> Fixed MAC addresses help with debugging as last four bytes identify the
> network namespace.
> 
> Moreover, it allows to mimic the real life setup with for example bridge
> having the same MAC address on each port.

Doesn't seem like a particularly scalable method of making tests more
debugable but alright...
patchwork-bot+netdevbpf@kernel.org June 6, 2024, 2:30 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon,  3 Jun 2024 11:33:21 +0200 you wrote:
> Fixed MAC addresses help with debugging as last four bytes identify the
> network namespace.
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>  tools/testing/selftests/net/hsr/hsr_ping.sh | 9 +++++++++
>  1 file changed, 9 insertions(+)

Here is the summary with links:
  - [net-next] selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses
    https://git.kernel.org/netdev/net-next/c/ed20142ed68c

You are awesome, thank you!
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/hsr/hsr_ping.sh b/tools/testing/selftests/net/hsr/hsr_ping.sh
index 3684b813b0f6..f5d207fc770a 100755
--- a/tools/testing/selftests/net/hsr/hsr_ping.sh
+++ b/tools/testing/selftests/net/hsr/hsr_ping.sh
@@ -152,6 +152,15 @@  setup_hsr_interfaces()
 	ip -net "$ns3" addr add 100.64.0.3/24 dev hsr3
 	ip -net "$ns3" addr add dead:beef:1::3/64 dev hsr3 nodad
 
+	ip -net "$ns1" link set address 00:11:22:00:01:01 dev ns1eth1
+	ip -net "$ns1" link set address 00:11:22:00:01:02 dev ns1eth2
+
+	ip -net "$ns2" link set address 00:11:22:00:02:01 dev ns2eth1
+	ip -net "$ns2" link set address 00:11:22:00:02:02 dev ns2eth2
+
+	ip -net "$ns3" link set address 00:11:22:00:03:01 dev ns3eth1
+	ip -net "$ns3" link set address 00:11:22:00:03:02 dev ns3eth2
+
 	# All Links up
 	ip -net "$ns1" link set ns1eth1 up
 	ip -net "$ns1" link set ns1eth2 up