Subject: Re: [PATCH net-next 3/3] selftests: net: add YNL test framework

From: Jakub Kicinski <[email-masked]>
Date: Fri, 31 Oct 2025 11:24:06 -0700

On Fri, 31 Oct 2025 01:48:17 +0000 Hangbin Liu wrote:
> > > Kind of. With this we can test both the system's YNL and also make sure the
> > > YNL interface has no regression.  
> > 
> > Meaning we still test the spec, right?  
> 
> I just do `make install` in tools/net/ynl. Both the ynl scripts and specs are
> installed. So I think the specs are also tested.
>
> > To state the obvious ideally we'd test both the specs and the Python
> > tools. Strictly better, and without it adding tests for new Python
> > features will be a little annoying for people running the selftest.  
> 
> Yes
> 
> > Maybe the solution is as simple as finding and alias'ing ynl to the
> > cli.py ?  
> 
> I didn't get here. The `ynl` calls pyynl.cli:main, that should be enough.
> Do you mean we should find the `cli.py` path and call it like
> `$source_code/tools/net/ynl/pyynl/cli.py --spec
> $source_code/Documentation/netlink/specs/xxx.yaml ...`?

More or less. But it needs to know how to install itself when kernel
selftests are installed. Maybe it's not worth the complexity and we
should add the script under tools/net/ynl. Easier to refer from there.