netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Petr Machata <petrm@nvidia.com>, <netdev@vger.kernel.org>
Subject: Re: [RFC PATCH net-next] selftests: forwarding: add a test for MAC Merge layer
Date: Mon, 20 Mar 2023 11:20:19 +0100	[thread overview]
Message-ID: <87wn3bpt6b.fsf@nvidia.com> (raw)
In-Reply-To: <20230317154541.e74slo6bqh573ge7@skbuf>


Vladimir Oltean <vladimir.oltean@nxp.com> writes:

> On Fri, Mar 17, 2023 at 04:35:58PM +0100, Petr Machata wrote:
>> 
>> Petr Machata <petrm@nvidia.com> writes:
>> 
>> > Petr Machata <petrm@nvidia.com> writes:
>> >
>> >> Petr Machata <petrm@nvidia.com> writes:
>> >>
>> >>> Vladimir Oltean <vladimir.oltean@nxp.com> writes:
>> >>>
>> >>>> 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.
>> >
>> > I added a shim as shown below. Comments welcome. Your patch then needs a
>> > bit of adaptation, plus I've dropped all the now-useless imports of
>> > qos_lib.sh. I'll pass this through our regression, and if nothing
>> > explodes, I'll point you at a branch tomorrow, and you can make the two
>> > patches a part of your larger patchset?
>> 
>> (I only pushed this to our regression today. The patches are the top two
>> ones here:
>> 
>>     https://github.com/pmachata/linux_mlxsw/commits/petrm_selftests_bail_on_lldpad_move
>> 
>> I'll let you know on Monday whether anything exploded in regression.)
>
> Thanks.
>
> Side question. Your bail_on_lldpad logic wants to avoid lldpad from
> being involved at all in the selftest. In my case, I want to make sure
> that the service is disabled system-wide, so that the selftest can start
> it by itself. Is that the best way to make use of lldpad in general in
> the kselftest framework?

^o^ I don't see why not. You could bail_on_lldpad, then proceed to start
it, then stop it after the test again. Maybe the error message needs
tweaking to work well with this use-case though.

  reply	other threads:[~2023-03-20 11:19 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
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 [this message]
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=87wn3bpt6b.fsf@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=netdev@vger.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 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).