diff mbox series

[net] selftests: bonding: fix macvlan2's namespace name

Message ID 20240204083828.1511334-1-liuhangbin@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [net] selftests: bonding: fix macvlan2's namespace name | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success Errors and warnings before: 2 this patch: 0
netdev/cc_maintainers success CCed 0 of 0 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success net selftest script(s) already in Makefile
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-02-04--21-00 (tests: 721)

Commit Message

Hangbin Liu Feb. 4, 2024, 8:38 a.m. UTC
The m2's ns name should be m2-xxxxxx, not m1.

Fixes: 246af950b940 ("selftests: bonding: add macvlan over bond testing")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Horman Feb. 6, 2024, 3:35 p.m. UTC | #1
On Sun, Feb 04, 2024 at 04:38:28PM +0800, Hangbin Liu wrote:
> The m2's ns name should be m2-xxxxxx, not m1.
> 
> Fixes: 246af950b940 ("selftests: bonding: add macvlan over bond testing")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>

Hi Hangbin Liu,

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

> ---
>  tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh b/tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh
> index dc99e4ac262e..969bf9af1b94 100755
> --- a/tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh
> +++ b/tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh
> @@ -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"
> -- 
> 2.43.0
> 
>
Jakub Kicinski Feb. 7, 2024, 1:21 a.m. UTC | #2
On Tue, 6 Feb 2024 15:35:15 +0000 Simon Horman wrote:
> On Sun, Feb 04, 2024 at 04:38:28PM +0800, Hangbin Liu wrote:
> > The m2's ns name should be m2-xxxxxx, not m1.
> > 
> > Fixes: 246af950b940 ("selftests: bonding: add macvlan over bond testing")
> > Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>  
> 
> 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.
Hangbin Liu Feb. 7, 2024, 1:45 a.m. UTC | #3
On Tue, Feb 06, 2024 at 03:35:15PM +0000, Simon Horman wrote:
> On Sun, Feb 04, 2024 at 04:38:28PM +0800, Hangbin Liu wrote:
> > The m2's ns name should be m2-xxxxxx, not m1.
> > 
> > Fixes: 246af950b940 ("selftests: bonding: add macvlan over bond testing")
> > Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> 
> 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

> 
> > ---
> >  tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh b/tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh
> > index dc99e4ac262e..969bf9af1b94 100755
> > --- a/tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh
> > +++ b/tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh
> > @@ -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"
> > -- 
> > 2.43.0
> > 
> >
diff mbox series

Patch

diff --git a/tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh b/tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh
index dc99e4ac262e..969bf9af1b94 100755
--- a/tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh
+++ b/tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh
@@ -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"