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

From
Hangbin Liu <hidden>
Date
2023-12-14 06:57:42
Reply to
Petr Machata, 2023-12-13
On Wed, Dec 13, 2023 at 11:31:50AM +0100, Petr Machata wrote:
Hmm, maybe we could side-step the issue? I suspect that vast majority of
what bonding uses are just generic helpers. log_test, check_err, that
sort of stuff. Unless I missed something, all of them set NUM_NETIFS=0.
Those things could all be in the generic net/lib.sh. So long-term it
might be possible for bonding to do the trick with symlinking, except
with just net/lib.sh, not both libs.

I think that most of forwarding/lib.sh actually belongs to net/lib.sh.
We reinvent a lot of that functionality in various net/ tests, because,
presumably, people find it odd to source forwarding/lib.sh. If it all
lived in net/, we could reuse all these tools instead of cut'n'pasting
them from one test to the other. Stuff like the mcast_packet_test,
start/stop_traffic, etc., would probably stay in forwarding.

So that's long-term. And short-term we can live with the ugly-as-sin
workaround that I propose?
For bonding only I think this is a good resolution. For other driver tests
that may still need to include forwarding/lib.sh. I think the way Benjamin
suggested is a good choice.

Thanks
Hangbin
Thread (15 messages) 15 messages, 5 authors, last reply 2023-12-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help