Skip to contentSkip to conversation

selftests: bonding: fix macvlan2's namespace name

PATCH In review Hangbin Liu 3 participants 4 messages Feb 4, 2024 – Feb 7, 2024

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

PATCH 1/1 selftests: bonding: fix macvlan2's namespace name

The m2's ns name should be m2-xxxxxx, not m1.

Fixes 246af950b940 ("selftests: bonding: add macvlan over bond testing")
---
 tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh +1 -1
index dc99e4ac262e..969bf9af1b94 100755
@@ -7,7 +7,7 @@ lib_dir=$(dirname "$0")
 source ${lib_dir}/bond_topo_2d1c.sh
 
 m1_ns="m1-$(mktemp -u XXXXXX)"
-m2_ns="m1-$(mktemp -u XXXXXX)"
+m2_ns="m2-$(mktemp -u XXXXXX)"
 m1_ip4="192.0.2.11"
 m1_ip6="2001:db8::11"
 m2_ip4="192.0.2.12"
Signature · 1 line
2.43.0
reviewer
#1 lore raw
Quoted 4 lines · Hangbin Liu

The m2's ns name should be m2-xxxxxx, not m1.

Fixes 246af950b940 ("selftests: bonding: add macvlan over bond testing")

Hi Hangbin Liu,

I agree this is a nice change.
But it is not clear to me that this is fixing a bug.

Quoted 21 lines
---
 tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh +1 -1
index dc99e4ac262e..969bf9af1b94 100755
@@ -7,7 +7,7 @@ lib_dir=$(dirname "$0")
 source ${lib_dir}/bond_topo_2d1c.sh
 
 m1_ns="m1-$(mktemp -u XXXXXX)"
-m2_ns="m1-$(mktemp -u XXXXXX)"
+m2_ns="m2-$(mktemp -u XXXXXX)"
 m1_ip4="192.0.2.11"
 m1_ip6="2001:db8::11"
 m2_ip4="192.0.2.12"
Signature · 1 line
2.43.0
maintainer
#2 lore raw
Quoted 10 lines · On Tue, 6 Feb 2024 15:35:15 +0000 Simon Horman wrote:
Quoted 4 lines · Hangbin Liu

The m2's ns name should be m2-xxxxxx, not m1.

Fixes 246af950b940 ("selftests: bonding: add macvlan over bond testing")

Hi Hangbin Liu,

I agree this is a nice change.
But it is not clear to me that this is fixing a bug.

Agreed, very unlikely mktemp would give us a collision. Please resend for net-next with no fixes tag.

#3 lore raw
In reply to Simon Horman
Quoted 10 lines · Simon Horman
Quoted 4 lines · Hangbin Liu

The m2's ns name should be m2-xxxxxx, not m1.

Fixes 246af950b940 ("selftests: bonding: add macvlan over bond testing")

Hi Hangbin Liu,

I agree this is a nice change.
But it is not clear to me that this is fixing a bug.

Ah, you are right. I also just realise that the previous code also works as we use mktemp, so the m1 and m2's name are unique, although the m2's name using m1 as prefix.

Please feel free to drop this patch. I can do the name modification in future when updating the bond_macvlan test.

Thanks
Hangbin

Quoted 22 lines
Quoted 22 lines
---
 tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh +1 -1
index dc99e4ac262e..969bf9af1b94 100755
@@ -7,7 +7,7 @@ lib_dir=$(dirname "$0")
 source ${lib_dir}/bond_topo_2d1c.sh
 
 m1_ns="m1-$(mktemp -u XXXXXX)"
-m2_ns="m1-$(mktemp -u XXXXXX)"
+m2_ns="m2-$(mktemp -u XXXXXX)"
 m1_ip4="192.0.2.11"
 m1_ip6="2001:db8::11"
 m2_ip4="192.0.2.12"
Signature · 1 line
2.43.0