diff mbox series

[net-next] selftests: drv-net: fix merge conflicts resolution

Message ID 20250314-net-next-drv-net-ping-fix-merge-v1-1-0d5c19daf707@kernel.org (mailing list archive)
State Mainlined
Delegated to: Paolo Abeni
Headers show
Series [net-next] selftests: drv-net: fix merge conflicts resolution | expand

Checks

Context Check Description
matttbe/build success Build and static analysis OK
matttbe/checkpatch success total: 0 errors, 0 warnings, 0 checks, 34 lines checked
matttbe/shellcheck success MPTCP selftests files have not been modified
matttbe/KVM_Validation__normal success Success! ✅
matttbe/KVM_Validation__debug success Success! ✅
matttbe/KVM_Validation__btf-normal__only_bpftest_all_ success Success! ✅
matttbe/KVM_Validation__btf-debug__only_bpftest_all_ success Success! ✅

Commit Message

Matthieu Baerts (NGI0) March 14, 2025, 8:35 a.m. UTC
After the recent merge between net-next and net, I got some conflicts on
my side because the merge resolution was different from Stephen's one
[1] I applied on my side in the MPTCP tree.

It looks like the code that is now in net-next is using the old way to
retrieve the local and remote addresses. This patch is now using the new
way, like what was in Stephen's email [1].

Also, in get_interface_info(), there were no conflicts in this area,
because that was new code from 'net', but a small adaptation was needed
there as well to get the remote address.

Fixes: 941defcea7e1 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
Link: https://lore.kernel.org/20250311115758.17a1d414@canb.auug.org.au [1]
Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 tools/testing/selftests/drivers/net/ping.py | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)


---
base-commit: 941defcea7e11ad7ff8f0d4856716dd637d757dd
change-id: 20250314-net-next-drv-net-ping-fix-merge-b303167fde16

Best regards,

Comments

Paolo Abeni March 14, 2025, 9:27 a.m. UTC | #1
On 3/14/25 9:35 AM, Matthieu Baerts (NGI0) wrote:
> After the recent merge between net-next and net, I got some conflicts on
> my side because the merge resolution was different from Stephen's one
> [1] I applied on my side in the MPTCP tree.
> 
> It looks like the code that is now in net-next is using the old way to
> retrieve the local and remote addresses. This patch is now using the new
> way, like what was in Stephen's email [1].
> 
> Also, in get_interface_info(), there were no conflicts in this area,
> because that was new code from 'net', but a small adaptation was needed
> there as well to get the remote address.
> 
> Fixes: 941defcea7e1 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
> Link: https://lore.kernel.org/20250311115758.17a1d414@canb.auug.org.au [1]
> Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
>  tools/testing/selftests/drivers/net/ping.py | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/tools/testing/selftests/drivers/net/ping.py b/tools/testing/selftests/drivers/net/ping.py
> index 7a1026a073681d159202015fc6945e91368863fe..79f07e0510ecc14d3bc2716e14f49f9381bb919f 100755
> --- a/tools/testing/selftests/drivers/net/ping.py
> +++ b/tools/testing/selftests/drivers/net/ping.py
> @@ -15,18 +15,18 @@ no_sleep=False
>  def _test_v4(cfg) -> None:
>      cfg.require_ipver("4")
>  
> -    cmd(f"ping -c 1 -W0.5 {cfg.remote_v4}")
> -    cmd(f"ping -c 1 -W0.5 {cfg.v4}", host=cfg.remote)
> -    cmd(f"ping -s 65000 -c 1 -W0.5 {cfg.remote_v4}")
> -    cmd(f"ping -s 65000 -c 1 -W0.5 {cfg.v4}", host=cfg.remote)
> +    cmd("ping -c 1 -W0.5 " + cfg.remote_addr_v["4"])
> +    cmd("ping -c 1 -W0.5 " + cfg.addr_v["4"], host=cfg.remote)
> +    cmd("ping -s 65000 -c 1 -W0.5 " + cfg.remote_addr_v["4"])
> +    cmd("ping -s 65000 -c 1 -W0.5 " + cfg.addr_v["4"], host=cfg.remote)
>  
>  def _test_v6(cfg) -> None:
>      cfg.require_ipver("6")
>  
> -    cmd(f"ping -c 1 -W5 {cfg.remote_v6}")
> -    cmd(f"ping -c 1 -W5 {cfg.v6}", host=cfg.remote)
> -    cmd(f"ping -s 65000 -c 1 -W0.5 {cfg.remote_v6}")
> -    cmd(f"ping -s 65000 -c 1 -W0.5 {cfg.v6}", host=cfg.remote)
> +    cmd("ping -c 1 -W5 " + cfg.remote_addr_v["6"])
> +    cmd("ping -c 1 -W5 " + cfg.addr_v["6"], host=cfg.remote)
> +    cmd("ping -s 65000 -c 1 -W0.5 " + cfg.remote_addr_v["6"])
> +    cmd("ping -s 65000 -c 1 -W0.5 " + cfg.addr_v["6"], host=cfg.remote)
>  
>  def _test_tcp(cfg) -> None:
>      cfg.require_cmd("socat", remote=True)
> @@ -120,7 +120,7 @@ def get_interface_info(cfg) -> None:
>      global remote_ifname
>      global no_sleep
>  
> -    remote_info = cmd(f"ip -4 -o addr show to {cfg.remote_v4} | awk '{{print $2}}'", shell=True, host=cfg.remote).stdout
> +    remote_info = cmd(f"ip -4 -o addr show to {cfg.remote_addr_v['4']} | awk '{{print $2}}'", shell=True, host=cfg.remote).stdout
>      remote_ifname = remote_info.rstrip('\n')
>      if remote_ifname == "":
>          raise KsftFailEx('Can not get remote interface')

Thanks for the very quick turnaround!

It really solves the mess I did.

Exceptionally applying (well) before the 24h grace period to keep the
tree sane.

Thanks!

Paolo
patchwork-bot+netdevbpf@kernel.org March 14, 2025, 9:30 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Fri, 14 Mar 2025 09:35:51 +0100 you wrote:
> After the recent merge between net-next and net, I got some conflicts on
> my side because the merge resolution was different from Stephen's one
> [1] I applied on my side in the MPTCP tree.
> 
> It looks like the code that is now in net-next is using the old way to
> retrieve the local and remote addresses. This patch is now using the new
> way, like what was in Stephen's email [1].
> 
> [...]

Here is the summary with links:
  - [net-next] selftests: drv-net: fix merge conflicts resolution
    https://git.kernel.org/netdev/net-next/c/a1e36ec36356

You are awesome, thank you!
MPTCP CI March 14, 2025, 10:01 a.m. UTC | #3
Hi Matthieu,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/13853089822

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/774e60951372
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=943849


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
diff mbox series

Patch

diff --git a/tools/testing/selftests/drivers/net/ping.py b/tools/testing/selftests/drivers/net/ping.py
index 7a1026a073681d159202015fc6945e91368863fe..79f07e0510ecc14d3bc2716e14f49f9381bb919f 100755
--- a/tools/testing/selftests/drivers/net/ping.py
+++ b/tools/testing/selftests/drivers/net/ping.py
@@ -15,18 +15,18 @@  no_sleep=False
 def _test_v4(cfg) -> None:
     cfg.require_ipver("4")
 
-    cmd(f"ping -c 1 -W0.5 {cfg.remote_v4}")
-    cmd(f"ping -c 1 -W0.5 {cfg.v4}", host=cfg.remote)
-    cmd(f"ping -s 65000 -c 1 -W0.5 {cfg.remote_v4}")
-    cmd(f"ping -s 65000 -c 1 -W0.5 {cfg.v4}", host=cfg.remote)
+    cmd("ping -c 1 -W0.5 " + cfg.remote_addr_v["4"])
+    cmd("ping -c 1 -W0.5 " + cfg.addr_v["4"], host=cfg.remote)
+    cmd("ping -s 65000 -c 1 -W0.5 " + cfg.remote_addr_v["4"])
+    cmd("ping -s 65000 -c 1 -W0.5 " + cfg.addr_v["4"], host=cfg.remote)
 
 def _test_v6(cfg) -> None:
     cfg.require_ipver("6")
 
-    cmd(f"ping -c 1 -W5 {cfg.remote_v6}")
-    cmd(f"ping -c 1 -W5 {cfg.v6}", host=cfg.remote)
-    cmd(f"ping -s 65000 -c 1 -W0.5 {cfg.remote_v6}")
-    cmd(f"ping -s 65000 -c 1 -W0.5 {cfg.v6}", host=cfg.remote)
+    cmd("ping -c 1 -W5 " + cfg.remote_addr_v["6"])
+    cmd("ping -c 1 -W5 " + cfg.addr_v["6"], host=cfg.remote)
+    cmd("ping -s 65000 -c 1 -W0.5 " + cfg.remote_addr_v["6"])
+    cmd("ping -s 65000 -c 1 -W0.5 " + cfg.addr_v["6"], host=cfg.remote)
 
 def _test_tcp(cfg) -> None:
     cfg.require_cmd("socat", remote=True)
@@ -120,7 +120,7 @@  def get_interface_info(cfg) -> None:
     global remote_ifname
     global no_sleep
 
-    remote_info = cmd(f"ip -4 -o addr show to {cfg.remote_v4} | awk '{{print $2}}'", shell=True, host=cfg.remote).stdout
+    remote_info = cmd(f"ip -4 -o addr show to {cfg.remote_addr_v['4']} | awk '{{print $2}}'", shell=True, host=cfg.remote).stdout
     remote_ifname = remote_info.rstrip('\n')
     if remote_ifname == "":
         raise KsftFailEx('Can not get remote interface')