From: Hangbin Liu <liuhangbin@gmail.com>
To: Benjamin Poirier <benjamin.poirier@gmail.com>
Cc: Patrice Duroux <patrice.duroux@gmail.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
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: Fri, 15 Dec 2023 10:35:32 +0800 [thread overview]
Message-ID: <ZXu7dGj7F9Ng8iIX@Laptop-X1> (raw)
In-Reply-To: <ZXt6_4WCxYoxgWqL@d3>
On Thu, Dec 14, 2023 at 05:00:31PM -0500, Benjamin Poirier wrote:
> I started to make the adjustments to all the tests but I got stuck on
> the dsa tests. The problem is that the tests which are symlinked (like
> bridge_locked_port.sh) expect to source lib.sh (net/forwarding/lib.sh)
> from the same directory. That lib.sh then expects to source net/lib.sh
> from the parent directory. Because `rsync --copy-unsafe-links` is used,
> all those links become regular files after export so we can't rely on
> `readlink -f`.
>
> Honestly, given how the dsa tests are organized, I don't see a clean way
> to support these tests without error after commit 25ae948b4478
> ("selftests/net: add lib.sh").
No worry, the last way is just make net/forwarding/lib.sh not source net/lib.sh :)
Although this would make us copy a lot functions from net/forwarding/lib.sh to
source net/lib.sh. So before that, let's try if we can
Move all the dsa tests back to net/forwarding (actually only needed for
test_bridge_fdb_stress.sh). And add a forwarding.config.dsa.sample. Maybe
a test list for dsa testing. But with this way the dsa testing will not
able to run via run_kselftest.sh.
Or, we can remove the symlinks, and add the dsa tests with exec the relative
forwarding path's tests directly. e.g.
### in das test folder
$ cat bridge_mld.sh
#!/bin/bash
../../../net/forwarding/bridge_mld.sh
$ cat Makefile
# SPDX-License-Identifier: GPL-2.0+ OR MIT
TEST_PROGS = \
bridge_mld.sh
TEST_SH_LIBS := \
net/lib.sh \
net/forwarding/lib.sh \
net/forwarding/bridge_mld.sh
TEST_FILES := forwarding.config
include ../../../lib.mk
### for net/forwarding/lib.sh looks we need source the ${PWD}/forwarding.config if run via run_kselftest.sh
if [[ -f ${PWD}/forwarding.config ]]; then
source "$PWD/forwarding.config"
elif [[ -f $relative_path/forwarding.config ]]; then
source "$relative_path/forwarding.config"
fi
What do you think?
Thanks
Hangbin
next prev parent reply other threads:[~2023-12-15 2:35 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
2023-12-14 22:00 ` Benjamin Poirier
2023-12-15 2:35 ` Hangbin Liu [this message]
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=ZXu7dGj7F9Ng8iIX@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=martin.blumenstingl@googlemail.com \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=patrice.duroux@gmail.com \
--cc=petrm@nvidia.com \
--cc=shuah@kernel.org \
--cc=vladimir.oltean@nxp.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 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.