From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.157 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796268213; b=HQb6GN/A1JO4Bgh9Sa9/9yLe4CKAlvt+ryhpHwXaLIIJORVXkDLj543GCwF1d3WQE/E5 qfzYWT8JoQ7aS8UWulIASqTeETgRWFU0XNS67nF9lxD0zVG5QmlR3RoBc+5+/aCoTMvfU fAP/NWQxLD2CmONdLckxgSzdW5l6FU5N3bAEd1p8zUkEgV7njzYafvG2XJv6ko+CmTlPB qRq0ra4QrOf+JO0FrxPcylyCBJHTcmVbDHsxKt8CP3W7BwA12dS/AW/OSHrpNSsW8zB49 I5fyyRdagnjiCYmiReUo8SHw8Nece7n3xJ8iHbO4Sm+2IPNHjL7pt2fmUGwRYDeNFAw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796268213; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=RHuSdEGTiAL0rX9oMXGh0hpgKGtvX7t7NgH59mbgpq0=; b=yfEZNngpkFA2BfzgkkxYgQ0WHQFCQZNe98+nHlCJ35Y13jnydWA140R6bO66lguPOdoK MURn67swQP9iT7ijMWBtGMXONCt8ob6VpQHxDr7qeLOp2CE0B6Zg+6wtM05v1zc/v9//i shE0tEUFNzejRpA3fhdO7fZmqqKX3XqWcZZhkPBHLW+aXr2kgmepeu5mW6FjUAfFFSqHI ybK0XEQ9z+XLyPcuA4U6ojRlAV8JY6oHj63EJsisJgOb98X0TGrtSflvGHxG1+3r5LL5h Mrx/zMBo4AfaAnFM83weg9Pv6AzytoelrMaOemBWiAReNqwF+4Msg2lzgIqjC///jlw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=hw5rN35q; arc=none smtp.remote-ip=91.218.175.157 Received: from mta0.migadu.com (out-157.mta0.migadu.com [91.218.175.157]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD2EF606A322 for ; Thu, 3 Dec 2026 03:23:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AD2EF606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=hw5rN35q X-Envelope-To: linux-kselftest@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=8ci7PmxvTxeiWUWN32xqoBItcU5Ke/5bMx2gayBM288=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796268210; v=1; x=1796873010; b=hw5rN35qaB+bqTc/QB7/xKYfympwpL/9oiIPqlcq1OxEANCMOvLtsGuBLtveetRKGdmW8P8g Bu2j0lKhOKXaQu5ZDokvSlHBSztVpXa0AI/xn053w6Bb78dg4zzFRI/2TSLJKhmfPCzoi9bKVXj datlE+NOAKx6jYAKkWljZhQo= X-Envelope-To: linux-kselftest@vger.kernel.org Received: by mta12.migadu.com with ESMTPS id 95673dcce7b3f8b3; Thu, 03 Dec 2026 03:23:30 +0000 X-Mizu-Trace-ID: 95673dcce7b3f8b3 X-Migadu-Flow: FLOW_OUT Date: Thu, 3 Dec 2026 11:23:18 +0800 From: Hangbin Liu To: ramses@well-founded.dev Cc: Jay Vosburgh , Andrew Lunn , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Jiri Bohac , Eric Dumazet , Willem de Bruijn , Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Nikolay Aleksandrov , Shuah Khan Subject: Re: [PATCH net-next 2/2] selftests: bonding: test that the ARP monitor keeps UP slaves when it starts Message-ID: References: <20261201-bonding-arp-reseed-v1-0-984d4a3991cb@well-founded.dev> <20261201-bonding-arp-reseed-v1-2-984d4a3991cb@well-founded.dev> X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261201-bonding-arp-reseed-v1-2-984d4a3991cb@well-founded.dev> Hi Ramses, On Tue, Dec 01, 2026 at 12:20:30PM +0200, Ramses de Norre via B4 Relay wrote: > From: Ramses de Norre > > Add a test for the two ways the ARP monitor can start after the slaves > were enslaved: bringing the bond up after enslaving into it while it is > down, and setting arp_interval on a running bond that uses miimon. In > both cases the test waits longer than the arp_missed_max window before > the monitor starts, and checks that the primary stays active and that no > slave gets a link failure. > > Without the previous patch, both cases fail: the first monitor run takes > both slaves down and the bond comes back on eth1, where it stays with > primary_reselect=failure. > > Signed-off-by: Ramses de Norre > --- > .../testing/selftests/drivers/net/bonding/Makefile | 1 + > .../drivers/net/bonding/bond_arp_monitor_start.sh | 154 +++++++++++++++++++++ > 2 files changed, 155 insertions(+) > > diff --git a/tools/testing/selftests/drivers/net/bonding/Makefile b/tools/testing/selftests/drivers/net/bonding/Makefile > index 46d9fede59185..12276c942506e 100644 > --- a/tools/testing/selftests/drivers/net/bonding/Makefile > +++ b/tools/testing/selftests/drivers/net/bonding/Makefile > @@ -6,6 +6,7 @@ TEST_PROGS := \ > bond-break-lacpdu-tx.sh \ > bond-eth-type-change.sh \ > bond-lladdr-target.sh \ > + bond_arp_monitor_start.sh \ > bond_ipsec_offload.sh \ > bond_lacp_independent_control.sh \ > bond_lacp_prio.sh \ > diff --git a/tools/testing/selftests/drivers/net/bonding/bond_arp_monitor_start.sh b/tools/testing/selftests/drivers/net/bonding/bond_arp_monitor_start.sh > new file mode 100755 > index 0000000000000..a718292172244 > --- /dev/null > +++ b/tools/testing/selftests/drivers/net/bonding/bond_arp_monitor_start.sh > @@ -0,0 +1,154 @@ > +#!/bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# > +# Check that the ARP monitor does not take UP slaves down when it starts > +# after the slaves were enslaved. That happens when the slaves are enslaved > +# while the bond is down, or when arp_interval is set on a running bond > +# that used miimon. The monitor must give the slaves a full arp_missed_max > +# window from when it starts, not from when they were enslaved. > +# > +# +------------------------+ > +# | bond0 192.0.2.1/24 | h_ns > +# | eth0 eth1 | > +# +---+-------------+------+ > +# | | > +# +---+-------------+------+ > +# | sw0 sw1 | sw_ns > +# | br0 192.0.2.254/24 | > +# +------------------------+ > + > +# shellcheck disable=SC2034,SC2329 > +ALL_TESTS=" > + arp_monitor_start_on_open > + arp_monitor_start_on_interval_set > +" > +REQUIRE_MZ=no > +NUM_NETIFS=0 > +lib_dir=$(dirname "$0") > +# shellcheck disable=SC1091 > +source "$lib_dir"/../../../net/forwarding/lib.sh > + > +require_command jq > + [...] > + > +trap cleanup EXIT > + > +setup_prepare > +setup_wait Since we don't need the NUM_NETIFS, there is no need to call setup_wait. With that, we can include net/lib.sh directly, and remove the REQUIRE_MZ/NUM_NETIFS setting. Thanks Hangbin > + > +tests_run > + > +exit "$EXIT_STATUS" > > -- > 2.56.1 > >