diff options
| author | Jakub Kicinski <[email protected]> | 2025-02-18 22:54:25 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-02-20 03:08:50 +0000 |
| commit | de94e8697405112b48c2cb8ee6ebe7c873e48f50 (patch) | |
| tree | 22d1e42646dffe19cd941f4655ce397b4c55d275 /tools/testing/selftests/drivers/net/ping.py | |
| parent | selftests: drv-net: get detailed interface info (diff) | |
| download | kernel-de94e8697405112b48c2cb8ee6ebe7c873e48f50.tar.gz kernel-de94e8697405112b48c2cb8ee6ebe7c873e48f50.zip | |
selftests: drv-net: store addresses in dict indexed by ipver
Looks like more and more tests want to iterate over IP version,
run the same test over ipv4 and ipv6. The current naming of
members in the env class makes it a bit awkward, we have
separate members for ipv4 and ipv6 parameters.
Store the parameters inside dicts, so that tests can easily
index them with ip version.
Reviewed-by: Willem de Bruijn <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/drivers/net/ping.py')
| -rwxr-xr-x | tools/testing/selftests/drivers/net/ping.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/testing/selftests/drivers/net/ping.py b/tools/testing/selftests/drivers/net/ping.py index eb83e7b48797..17dc11e9b6dd 100755 --- a/tools/testing/selftests/drivers/net/ping.py +++ b/tools/testing/selftests/drivers/net/ping.py @@ -8,17 +8,17 @@ from lib.py import bkg, cmd, wait_port_listen, rand_port def test_v4(cfg) -> None: - cfg.require_v4() + 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("ping -c 1 -W0.5 " + cfg.remote_addr_v["4"]) + cmd("ping -c 1 -W0.5 " + cfg.addr_v["4"], host=cfg.remote) def test_v6(cfg) -> None: - cfg.require_v6() + cfg.require_ipver("6") - cmd(f"ping -c 1 -W0.5 {cfg.remote_v6}") - cmd(f"ping -c 1 -W0.5 {cfg.v6}", host=cfg.remote) + cmd("ping -c 1 -W0.5 " + cfg.remote_addr_v["6"]) + cmd("ping -c 1 -W0.5 " + cfg.addr_v["6"], host=cfg.remote) def test_tcp(cfg) -> None: |
