From: Petr Machata <petrm@nvidia.com>
To: Shuah Khan <skhan@linuxfoundation.org>
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>,
Ido Schimmel <idosch@nvidia.com>, Amit Cohen <amcohen@nvidia.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>, <mlxsw@nvidia.com>,
Shuah Khan <shuah@kernel.org>,
Benjamin Poirier <bpoirier@nvidia.com>,
Hangbin Liu <liuhangbin@gmail.com>,
<linux-kselftest@vger.kernel.org>, Jiri Pirko <jiri@resnulli.us>
Subject: Re: [PATCH net-next 4/8] selftests: net: lib: Move logging from forwarding/lib.sh here
Date: Thu, 24 Oct 2024 12:06:37 +0200 [thread overview]
Message-ID: <87bjz9iz7u.fsf@nvidia.com> (raw)
In-Reply-To: <477cac2e-606d-4c78-ba5e-ce7e594bb6f5@linuxfoundation.org>
Shuah Khan <skhan@linuxfoundation.org> writes:
> On 10/22/24 08:50, Petr Machata wrote:
>> Many net selftests invent their own logging helpers. These really should be
>> in a library sourced by these tests. Currently forwarding/lib.sh has a
>> suite of perfectly fine logging helpers, but sourcing a forwarding/ library
>> from a higher-level directory smells of layering violation. In this patch,
>> move the logging helpers to net/lib.sh so that every net test can use them.
>> Together with the logging helpers, it's also necessary to move
>> pause_on_fail(), and EXIT_STATUS and RET.
>> Existing lib.sh users might be using these same names for their functions
>> or variables. However lib.sh is always sourced near the top of the
>> file (checked), and whatever new definitions will simply override the ones
>> provided by lib.sh.
>
> I like the direction to leverage and make logging functions
> common. It make sense to use prefix to clearly indicate
> that they are common and to namespace conflicts in the future.
Yeah, for newly added logical blocks we should probably do something
like the defer patchset did, where the module is introduced as a
separate small library with clear namespacing and marking of what is
internal and what is public. But there are years of baggage in bash
selftests at this point, so the changes can't quite be very dramatic,
because any changes risk invalidating a test.
next prev parent reply other threads:[~2024-10-24 10:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 14:50 [PATCH net-next 0/8] net: Shift responsibility for FDB notifications to drivers Petr Machata
2024-10-22 14:50 ` [PATCH net-next 1/8] net: rtnetlink: Publish rtnl_fdb_notify() Petr Machata
2024-10-22 14:50 ` [PATCH net-next 2/8] ndo_fdb_add: Shift responsibility for notifying to drivers Petr Machata
2024-10-22 14:50 ` [PATCH net-next 3/8] ndo_fdb_del: " Petr Machata
2024-10-22 14:50 ` [PATCH net-next 4/8] selftests: net: lib: Move logging from forwarding/lib.sh here Petr Machata
2024-10-23 20:07 ` Shuah Khan
2024-10-24 10:06 ` Petr Machata [this message]
2024-10-22 14:50 ` [PATCH net-next 5/8] selftests: net: lib: Move tests_run " Petr Machata
2024-10-22 14:50 ` [PATCH net-next 6/8] selftests: net: lib: Move checks " Petr Machata
2024-10-22 14:50 ` [PATCH net-next 7/8] selftests: net: lib: Add kill_process Petr Machata
2024-10-22 14:50 ` [PATCH net-next 8/8] selftests: net: fdb_notify: Add a test for FDB notifications Petr Machata
2024-10-29 19:16 ` [PATCH net-next 0/8] net: Shift responsibility for FDB notifications to drivers Jakub Kicinski
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=87bjz9iz7u.fsf@nvidia.com \
--to=petrm@nvidia.com \
--cc=amcohen@nvidia.com \
--cc=bpoirier@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.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).