The driver selftest environment picks a single address family for tests which use the generic address fields. When both IPv4 and IPv6 are available it prefers IPv6, which can leave IPv4 paths untested and hide IPv4-only bugs.
This happened recently in the XDP selftest, where an IPv4 checksum bug was missed when IPv6 was also configured. XDP traffic handling has IP-version-specific code paths, and the follow-up discussion concluded that the XDP tests should run against both IP versions [1]. This series changes NetDrvEpEnv from exposing only the initially selected address family to allowing tests to switch the generic address fields between IP versions. xdp.py uses this to run the XDP traffic cases over both IPv4 and IPv6. Test variants whose required IP version is not configured are skipped. [1] https://lore.kernel.org/[email protected]/ Nimrod Oren (2): selftests: drv-net: allow switching env IP version selftests: drv-net: xdp: run with both IP versions .../selftests/drivers/net/lib/py/env.py | 27 ++++-- tools/testing/selftests/drivers/net/xdp.py | 94 +++++++++++++++---- 2 files changed, 97 insertions(+), 24 deletions(-) -- 2.45.0

