Skip to contentSkip to conversation

selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses

PATCH Applied Lukasz Majewski 3 participants 5 messages Jun 3, 2024 – Jun 6, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses

Fixed MAC addresses help with debugging as last four bytes identify the network namespace.

---
 tools/testing/selftests/net/hsr/hsr_ping.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
tools/testing/selftests/net/hsr/hsr_ping.sh +9 -0
index 3684b813b0f6..f5d207fc770a 100755
@@ -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
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 selftests: hsr: Extend the hsr_redbox.sh test to use fixed MAC addresses

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.

---
 tools/testing/selftests/net/hsr/hsr_redbox.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
tools/testing/selftests/net/hsr/hsr_redbox.sh +15 -0
index 1f36785347c0..998103502d5d 100755
@@ -96,6 +96,21 @@ setup_hsr_interfaces()
 	ip -n "${ns4}" link set ns4eth1 up
 	ip -n "${ns5}" link set ns5eth1 up
 
+	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 "$ns2" link set address 00:11:22:00:02:03 dev ns2eth3
+
+	ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth1
+	ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth2
+	ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth3
+	ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3br1
+
+	ip -net "$ns4" link set address 00:11:22:00:04:01 dev ns4eth1
+	ip -net "$ns5" link set address 00:11:22:00:05:01 dev ns5eth1
+
 	ip -net "${ns1}" link add name hsr1 type hsr slave1 ns1eth1 slave2 ns1eth2 supervision 45 version ${HSRv} proto 0
 	ip -net "${ns2}" link add name hsr2 type hsr slave1 ns2eth1 slave2 ns2eth2 interlink ns2eth3 supervision 45 version ${HSRv} proto 0
 
Signature · 1 line
2.20.1
maintainer
#2 lore raw

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

Quoted 5 lines · 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...

#3 lore raw

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

In reply to Lukasz Majewski
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Mon, 3 Jun 2024 11:33:22 +0200 you 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.

[...]

Here is the summary with links:
- [net-next] selftests: hsr: Extend the hsr_redbox.sh test to use fixed MAC addresses

    https://git.kernel.org/netdev/net-next/c/955edd872baf

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
#4 lore raw
In reply to Lukasz Majewski
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 7 lines · 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.

---
 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!

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