Subject: Re: [PATCHv2 net-next 3/3] tools: ynl: add YNL test framework

From: Sabrina Dubroca <[email-masked]>
Date: Wed, 5 Nov 2025 18:00:06 +0100

2025-11-05, 08:28:41 +0000, Hangbin Liu wrote:
> +setup() {
> +	if ! modprobe netdevsim &>/dev/null; then
> +		echo "SKIP: all YNL CLI tests (netdevsim module not available)"

Can we maybe find a way to try to load the module and still run the
test if modprobe fails but netdevsim is built-in? I usually do my
testing in VMs with kernels where everything I need is built in, so I
don't do "make modules_install" and "modprobe netdevsim" fails even if
netdevsim is actually available (because it's built in).

For some modules it may be difficult, for netdevsim we could just run
modprobe (but ignore its return value) and check if
/sys/bus/netdevsim/new_device exists to decide if we need to skip the
tests?

Or do we only expect selftests/those new tests to run with the
standard net selftests config, and not with custom configs that also
provide all the required features?

-- 
Sabrina