]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: net: Add IPv6 support to netconsole basic tests
authorBreno Leitao <leitao@debian.org>
Wed, 2 Jul 2025 10:06:39 +0000 (03:06 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Jul 2025 01:52:57 +0000 (18:52 -0700)
commit3dc6c76391cbe5ec7f87531d992beaf7dccc6ff4
tree1ecbe36eead3c1dc0be11040094f83d0054be07f
parenteb4e773f13fb701e3dfc2059afd21a2dcdb2d0ba
selftests: net: Add IPv6 support to netconsole basic tests

Add IPv6 support to the netconsole basic functionality tests by:

- Introducing separate IPv4 and IPv6 address variables (SRCIP4/SRCIP6,
  DSTIP4/DSTIP6) to replace the single SRCIP/DSTIP variables
- Adding select_ipv4_or_ipv6() function to choose protocol version
- Updating socat configuration to use UDP6-LISTEN for IPv6 tests
- Adding wait_for_port() wrapper to handle protocol-specific port waiting
- Expanding test matrix to run both basic and extended formats against
  both IPv4 and IPv6 protocols
- Improving cleanup to kill any remaining socat processes
- Adding sleep delays for better IPv6 packet handling reliability

The test now validates netconsole functionality across both IP versions,
improving test coverage for dual-stack network environments.

This test would avoid the regression fixed by commit f59902070269 ("net:
netpoll: Initialize UDP checksum field before checksumming")

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250702-netpoll_untagle_ip-v2-7-13cf3db24e2b@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
tools/testing/selftests/drivers/net/netcons_basic.sh