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

From: Hangbin Liu <[email-masked]>
Date: Thu, 6 Nov 2025 01:39:14 +0000

On Wed, Nov 05, 2025 at 06:00:06PM +0100, Sabrina Dubroca wrote:
> 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?

Yes, could be.
> 
> 
> 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?

I do not have a preference. I added a config file to the test folder. However,
this config file is just for reference.

Thanks
Hangbin