From: Hangbin Liu <liuhangbin@gmail.com>
To: Benjamin Poirier <benjamin.poirier@gmail.com>
Cc: Petr Machata <petrm@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
mlxsw@nvidia.com, Jay Vosburgh <j.vosburgh@gmail.com>
Subject: Re: [PATCH net-next] selftests: forwarding: Import top-level lib.sh through $lib_dir
Date: Thu, 14 Dec 2023 15:06:49 +0800 [thread overview]
Message-ID: <ZXqpieBoynMk0U-Z@Laptop-X1> (raw)
In-Reply-To: <ZXok5cRZDKdjX1nj@d3>
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
next prev parent reply other threads:[~2023-12-14 7:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 12:01 [PATCH net-next] selftests: forwarding: Import top-level lib.sh through $lib_dir Petr Machata
2023-12-11 12:44 ` Hangbin Liu
2023-12-12 17:22 ` Petr Machata
2023-12-12 20:17 ` Benjamin Poirier
2023-12-13 6:00 ` Hangbin Liu
2023-12-13 21:40 ` Benjamin Poirier
2023-12-14 7:06 ` Hangbin Liu [this message]
2023-12-14 22:00 ` Benjamin Poirier
2023-12-15 2:35 ` Hangbin Liu
2023-12-15 23:30 ` Benjamin Poirier
2023-12-21 16:58 ` Vladimir Oltean
2023-12-22 14:09 ` Benjamin Poirier
2023-12-13 10:03 ` Petr Machata
2023-12-13 10:31 ` Petr Machata
2023-12-14 6:57 ` Hangbin Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZXqpieBoynMk0U-Z@Laptop-X1 \
--to=liuhangbin@gmail.com \
--cc=benjamin.poirier@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=j.vosburgh@gmail.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.