From: Benjamin Poirier <bpoirier@nvidia.com>
To: Jay Vosburgh <jay.vosburgh@canonical.com>
Cc: netdev@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Andy Gospodarek <andy@greyhouse.net>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Petr Machata <petrm@nvidia.com>,
Danielle Ratson <danieller@nvidia.com>,
Nikolay Aleksandrov <razor@blackwall.org>,
Ido Schimmel <idosch@nvidia.com>,
Johannes Nixdorf <jnixdorf-oss@avm.de>,
Davide Caratti <dcaratti@redhat.com>,
Tobias Waldekranz <tobias@waldekranz.com>,
Zahari Doychev <zdoychev@maxlinear.com>,
Hangbin Liu <liuhangbin@gmail.com>,
linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next 2/6] selftests: bonding: Add net/forwarding/lib.sh to TEST_INCLUDES
Date: Wed, 24 Jan 2024 14:27:02 -0500 [thread overview]
Message-ID: <ZbFkhmEHBSHgJ4d1@d3> (raw)
In-Reply-To: <8205.1706120677@famine>
On 2024-01-24 10:24 -0800, Jay Vosburgh wrote:
[...]
> >diff --git a/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh b/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh
> >index a509ef949dcf..0eb7edfb584c 100644
> >--- a/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh
> >+++ b/tools/testing/selftests/drivers/net/bonding/bond_topo_2d1c.sh
> >@@ -28,7 +28,7 @@
> > REQUIRE_MZ=no
> > NUM_NETIFS=0
> > lib_dir=$(dirname "$0")
> >-source ${lib_dir}/net_forwarding_lib.sh
> >+source "$lib_dir"/../../../net/forwarding/lib.sh
>
> Is there a way to pass TEST_INCLUDES via the environment or as a
> parameter, so that it's not necessary to hard code the path name here
> and in the similar cases below?
It think would be possible but I see two issues:
1) Tests can be run in a myriad ways. Some of them (`make run_tests`,
`run_kselftest.sh`) use runner.sh which would be the place to set
environment variables for a test. However it's also possible to run
tests directly:
tools/testing/selftests/drivers/net/bonding# ./dev_addr_lists.sh
In that case, there's nothing to automatically set an environment
variable for the test.
I think that could be addressed, for example by putting the content of
TEST_INCLUDES in a file and having the test read it itself, but ...
2)
As can be seen in the dsa case and in the bonding and team cases after
patch 6, the relationship between the files listed in TEST_INCLUDES and
the files sourced in a test is not 1:1. So automatically sourcing all
files listed in TEST_INCLUDES is not generally applicable.
Given these two points, I'm inclined to stick with the current approach.
What do you think?
next prev parent reply other threads:[~2024-01-24 19:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 17:02 [PATCH net-next 0/6] selftests: Add TEST_INCLUDES directive and adjust tests to use it Benjamin Poirier
2024-01-24 17:02 ` [PATCH net-next 1/6] selftests: Introduce Makefile variable to list shared bash scripts Benjamin Poirier
2024-01-25 4:46 ` Jakub Kicinski
2024-01-25 16:43 ` Benjamin Poirier
2024-01-24 17:02 ` [PATCH net-next 2/6] selftests: bonding: Add net/forwarding/lib.sh to TEST_INCLUDES Benjamin Poirier
2024-01-24 18:24 ` Jay Vosburgh
2024-01-24 19:27 ` Benjamin Poirier [this message]
2024-01-25 1:04 ` Jay Vosburgh
2024-01-25 4:04 ` Hangbin Liu
2024-01-24 17:02 ` [PATCH net-next 3/6] selftests: team: Add shared library scripts " Benjamin Poirier
2024-01-24 17:02 ` [PATCH net-next 4/6] selftests: dsa: Replace test symlinks by wrapper script Benjamin Poirier
2024-01-24 17:02 ` [PATCH net-next 5/6] selftests: forwarding: Redefine relative_path variable Benjamin Poirier
2024-01-24 17:02 ` [PATCH net-next 6/6] selftests: forwarding: Remove duplicated lib.sh content Benjamin Poirier
2024-01-25 4:07 ` [PATCH net-next 0/6] selftests: Add TEST_INCLUDES directive and adjust tests to use it 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=ZbFkhmEHBSHgJ4d1@d3 \
--to=bpoirier@nvidia.com \
--cc=andrew@lunn.ch \
--cc=andy@greyhouse.net \
--cc=corbet@lwn.net \
--cc=danieller@nvidia.com \
--cc=davem@davemloft.net \
--cc=dcaratti@redhat.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=idosch@nvidia.com \
--cc=jay.vosburgh@canonical.com \
--cc=jiri@resnulli.us \
--cc=jnixdorf-oss@avm.de \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=razor@blackwall.org \
--cc=shuah@kernel.org \
--cc=tobias@waldekranz.com \
--cc=zdoychev@maxlinear.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).