Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: net: Skip test if IPv6 is not configured

Extend the `check_for_dependencies()` function in `lib_netcons.sh` to check
whether IPv6 is enabled by verifying the existence of
`/proc/net/if_inet6`. Having IPv6 is a now a dependency of netconsole
tests. If the file does not exist, the script will skip the test with an
appropriate message suggesting to verify if `CONFIG_IPV6` is enabled.

This prevents the test to misbehave if IPv6 is not configured.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250723-netcons_test_ipv6-v1-1-41c9092f93f9@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Breno Leitao and committed by
Jakub Kicinski
5ec9b15d a75afcd1

+5
+5
tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
··· 281 281 exit "${ksft_skip}" 282 282 fi 283 283 284 + if [ ! -f /proc/net/if_inet6 ]; then 285 + echo "SKIP: IPv6 not configured. Check if CONFIG_IPV6 is enabled" >&2 286 + exit "${ksft_skip}" 287 + fi 288 + 284 289 if [ ! -f "${NSIM_DEV_SYS_NEW}" ]; then 285 290 echo "SKIP: file ${NSIM_DEV_SYS_NEW} does not exist. Check if CONFIG_NETDEVSIM is enabled" >&2 286 291 exit "${ksft_skip}"