[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZXqpieBoynMk0U-Z@Laptop-X1>
Date: Thu, 14 Dec 2023 15:06:49 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: Benjamin Poirier <benjamin.poirier@...il.com>
Cc: Petr Machata <petrm@...dia.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, Shuah Khan <shuah@...nel.org>,
mlxsw@...dia.com, Jay Vosburgh <j.vosburgh@...il.com>
Subject: Re: [PATCH net-next] selftests: forwarding: Import top-level lib.sh
through $lib_dir
Hi Benjamin,
On Wed, Dec 13, 2023 at 04:40:53PM -0500, Benjamin Poirier wrote:
> > Hmm.. Is it possible to write a rule in the Makefile to create the net/
> > and net/forwarding folder so we can source the relative path directly. e.g.
> >
> > ]# tree
> > .
> > ├── drivers
> > │ └── net
> > │ └── bonding
> > │ ├── bond-arp-interval-causes-panic.sh
> > │ ├── ...
> > │ └── settings
> > ├── kselftest
> > │ ├── module.sh
> > │ ├── prefix.pl
> > │ └── runner.sh
> > ├── kselftest-list.txt
> > ├── net
> > │ ├── forwarding
> > │ │ └── lib.sh
> > │ └── lib.sh
> > └── run_kselftest.sh
>
> That sounds like a good idea. I started to work on that approach but I'm
> missing recursive inclusion. For instance
>
> cd tools/testing/selftests
> make install TARGETS="drivers/net/bonding"
> ./kselftest_install/run_kselftest.sh -t drivers/net/bonding:dev_addr_lists.sh
>
> includes net/forwarding/lib.sh but is missing net/lib.sh. I feel that my
> 'make' skills are rusty but I guess that with enough make code, it could
> be done. A workaround is simply to manually list the transitive
> dependencies in TEST_SH_LIBS:
> TEST_SH_LIBS := \
> - net/forwarding/lib.sh
> + net/forwarding/lib.sh \
> + net/lib.sh
Yes, this makes the user need to make sure all the recursive inclusions listed
here. A little inconvenient. But I "make" skill is worse than you...
>
> I only converted a few files to validate that the approach is viable. I
> used the following tests:
> drivers/net/bonding/dev_addr_lists.sh
> net/test_vxlan_vnifiltering.sh
> net/forwarding/pedit_ip.sh
>
> Let me know what you think.
Thanks! This works for me.
Cheers
Hangbin
Powered by blists - more mailing lists