From: Breno Leitao <leitao@debian.org>
To: Louis Scalbert <louis.scalbert@6wind.com>
Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch, jv@jvosburgh.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
fbl@redhat.com, andy@greyhouse.net, shemminger@vyatta.com,
maheshb@google.com, jonas.gorski@gmail.com
Subject: Re: [PATCH net v5 4/4] selftests: bonding: add test for lacp_strict mode
Date: Wed, 6 May 2026 09:33:28 -0700 [thread overview]
Message-ID: <aftsOtnImLpgATff@gmail.com> (raw)
In-Reply-To: <20260506161144.465485-5-louis.scalbert@6wind.com>
On Wed, May 06, 2026 at 06:11:44PM +0200, Louis Scalbert wrote:
> Add a test for the bonding lacp_strict mode.
Test seems fine, although it seems there is a bunch of copy & paste. Any
chance you can mke it a bit more modular with some helpers that can be
reused?
> diff --git a/tools/testing/selftests/drivers/net/bonding/Makefile b/tools/testing/selftests/drivers/net/bonding/Makefile
> index 9af5f84edd37..91269e7ceb63 100644
> --- a/tools/testing/selftests/drivers/net/bonding/Makefile
> +++ b/tools/testing/selftests/drivers/net/bonding/Makefile
> @@ -7,6 +7,7 @@ TEST_PROGS := \
> bond-eth-type-change.sh \
> bond-lladdr-target.sh \
> bond_ipsec_offload.sh \
> + bond_lacp_strict.sh \
TEST_PROGS is sorted alphabetically; bond_lacp_strict.sh should sort
after bond_lacp_prio.sh, not before it.
> +COLLECTING_DISTRIBUTING_MASK=48
> +COLLECTING_DISTRIBUTING=48
> +FAILED=0
FAILED is a bit misleading here.
> + # Allow LACP trames forwarding on bridge ports
s/trames/frames ?
> + RET=1
> +
> +}
Remove the extra line above.
> +
> +compare_state() {
> + local actual_state=$1
> + local expected_state=$2
> + local iface=$3
> + local last_attempt=$4
> +
> + [ $((actual_state & COLLECTING_DISTRIBUTING_MASK)) -eq "$expected_state" ] \
> + && return 0
The line above is hard to read, and idententation is a bit off as well.
prev parent reply other threads:[~2026-05-06 16:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 16:11 [PATCH net v5 0/4] bonding: 3ad: fix carrier state with no usable slaves Louis Scalbert
2026-05-06 16:11 ` [PATCH net v5 1/4] bonding: 3ad: add lacp_strict configuration knob Louis Scalbert
2026-05-06 16:11 ` [PATCH net v5 2/4] bonding: 3ad: fix carrier when no usable slaves Louis Scalbert
2026-05-06 16:11 ` [PATCH net v5 3/4] bonding: 3ad: fix mux port state on oper down Louis Scalbert
2026-05-12 10:09 ` Jay Vosburgh
2026-05-06 16:11 ` [PATCH net v5 4/4] selftests: bonding: add test for lacp_strict mode Louis Scalbert
2026-05-06 16:33 ` Breno Leitao [this message]
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=aftsOtnImLpgATff@gmail.com \
--to=leitao@debian.org \
--cc=andrew+netdev@lunn.ch \
--cc=andy@greyhouse.net \
--cc=edumazet@google.com \
--cc=fbl@redhat.com \
--cc=jonas.gorski@gmail.com \
--cc=jv@jvosburgh.net \
--cc=kuba@kernel.org \
--cc=louis.scalbert@6wind.com \
--cc=maheshb@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shemminger@vyatta.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