From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Petr Machata <petrm@nvidia.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Michal Kubecek <mkubecek@suse.cz>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
Kurt Kanzenbach <kurt@linutronix.de>,
Rui Sousa <rui.sousa@nxp.com>,
Ferenc Fejes <ferenc.fejes@ericsson.com>,
Pranavi Somisetty <pranavi.somisetty@amd.com>,
Harini Katakam <harini.katakam@amd.com>,
UNGLinuxDriver@microchip.com, Ido Schimmel <idosch@nvidia.com>,
Aaron Conole <aconole@redhat.com>
Subject: Re: [RFC PATCH net-next] selftests: forwarding: add a test for MAC Merge layer
Date: Wed, 15 Mar 2023 17:52:20 +0200 [thread overview]
Message-ID: <20230315155220.7bcfh2nt2qz77gju@skbuf> (raw)
In-Reply-To: <87sff8bgkm.fsf@nvidia.com>
Hi Petr,
On Tue, Feb 14, 2023 at 12:53:06PM +0100, Petr Machata wrote:
>
> Vladimir Oltean <vladimir.oltean@nxp.com> writes:
>
> > Hi Petr,
> >
> > On Mon, Feb 13, 2023 at 11:51:37AM +0100, Petr Machata wrote:
> >> Vladimir Oltean <vladimir.oltean@nxp.com> writes:
> >>
> >> > +# Borrowed from mlxsw/qos_lib.sh, message adapted.
> >> > +bail_on_lldpad()
> >> > +{
> >> > + if systemctl is-active --quiet lldpad; then
> >> > + cat >/dev/stderr <<-EOF
> >> > + WARNING: lldpad is running
> >> > +
> >> > + lldpad will likely autoconfigure the MAC Merge layer,
> >> > + while this test will configure it manually. One of them
> >> > + is arbitrarily going to overwrite the other. That will
> >> > + cause spurious failures (or, unlikely, passes) of this
> >> > + test.
> >> > + EOF
> >> > + exit 1
> >> > + fi
> >> > +}
> >>
> >> This would be good to have unified. Can you make the function reusable,
> >> with a generic or parametrized message? I should be able to carve a bit
> >> of time later to move it to lib.sh, migrate the mlxsw selftests, and
> >> drop the qos_lib.sh copy.
> >
> > Maybe like this?
>
> Yes, for most of them, but the issue is that...
>
> > diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_tbf_ets.sh b/tools/testing/selftests/drivers/net/mlxsw/sch_tbf_ets.sh
> > index c6ce0b448bf3..bf57400e14ee 100755
> > --- a/tools/testing/selftests/drivers/net/mlxsw/sch_tbf_ets.sh
> > +++ b/tools/testing/selftests/drivers/net/mlxsw/sch_tbf_ets.sh
> > @@ -2,7 +2,7 @@
> > # SPDX-License-Identifier: GPL-2.0
> >
> > source qos_lib.sh
> > -bail_on_lldpad
> > +bail_on_lldpad "configure DCB" "configure Qdiscs"
>
> ... lib.sh isn't sourced at this point yet. `source
> $lib_dir/sch_tbf_ets.sh' brings that in later in the file, so the bail
> would need to be below that. But if it is, it won't run until after the
> test, which is useless.
>
> Maybe all it takes is to replace that `source qos_lib.sh' with
> `NUM_NETIFS=0 source $lib_dir/lib.sh', as we do in in_ns(), but I'll
> need to check.
>
> That's why I proposed to do it myself, some of it is fiddly and having a
> switch handy is going to be... um, handy.
Are you planning to take a look and see whether the callers of bail_on_lldpad()
can also source $lib_dir/lib.sh? Should I resend a blind change here?
next prev parent reply other threads:[~2023-03-15 15:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 22:12 [RFC PATCH net-next] selftests: forwarding: add a test for MAC Merge layer Vladimir Oltean
2023-02-13 10:51 ` Petr Machata
2023-02-13 11:39 ` Vladimir Oltean
2023-02-14 11:53 ` Petr Machata
2023-03-15 15:52 ` Vladimir Oltean [this message]
2023-03-16 11:10 ` Petr Machata
2023-03-16 13:43 ` Petr Machata
2023-03-17 15:35 ` Petr Machata
2023-03-17 15:45 ` Vladimir Oltean
2023-03-20 10:20 ` Petr Machata
2023-03-20 13:49 ` Petr Machata
2023-02-13 11:42 ` Kurt Kanzenbach
2023-02-13 12:02 ` Vladimir Oltean
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=20230315155220.7bcfh2nt2qz77gju@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=aconole@redhat.com \
--cc=ferenc.fejes@ericsson.com \
--cc=harini.katakam@amd.com \
--cc=idosch@nvidia.com \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=petrm@nvidia.com \
--cc=pranavi.somisetty@amd.com \
--cc=rui.sousa@nxp.com \
--cc=vinicius.gomes@intel.com \
--cc=xiaoliang.yang_1@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox