Subject: Re: [PATCH net-next] selftests: forwarding: Import top-level lib.sh through $lib_dir

From: Benjamin Poirier <[email-masked]>
Date: Fri, 22 Dec 2023 09:09:15 -0500

On 2023-12-21 18:58 +0200, Vladimir Oltean wrote:
> On Thu, Dec 14, 2023 at 05:00:31PM -0500, Benjamin Poirier wrote:
> > Patrice, Vladimir, Martin, how do you run the dsa tests?
> 
> Not how they're supposed to, apparently.
> 
> I used to rsync the "selftests" folder to the device under test, go
> to the drivers/net/dsa directory, and ./ the test from there. That is
> absolutely sufficient without all the "make kselftest" / run_kselftest.sh
> overhead which I don't need, but apparently that broken now too.
> 
> I don't have a strong objection against eliminating the symlinks.
> They were just a handy way of filtering those tests from net/forwarding/
> which were relevant to DSA, and just ignore the test.
> 
> What might turn out to be problematic is DSA's forwarding.config, where
> we actually rely on the STABLE_MAC_ADDRS option for some tests to pass.
> I'm not actually sure what is the "recommended" way of deploying a
> custom forwarding.config file anyway.

Thank you for sharing that info. There are so many different ways to run
the selftests, there is no "one true way". Thanks to Hangbin's
suggestion earlier in the thread I found a way to make things work for
the dsa tests after commit 25ae948b4478 ("selftests/net: add lib.sh") by
adding a wrapper script that sources another test; see the RFC that I
just posted:
https://lore.kernel.org/netdev/[email-masked]/T/#t

drivers/net/dsa will still have links to the net/forwarding/ tests so
today's functionality should be preserved, including forwarding.config.