Article View: linux.kernel.netdev
Article #22862[PATCH net 3/3] selftests: bonding: add recovery updelay test for broadcast mode
From: Hangbin Liu
Date: Thu, 26 Nov 2026 02:30
Date: Thu, 26 Nov 2026 02:30
108 lines
12112 bytes
12112 bytes
From: Hangbin Liu <liuhangbin@kylinos.cn>
Add a recovery updelay test for bonding mode 3. Merge all related tests
into a single test file.
Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
---
.../testing/selftests/drivers/net/bonding/Makefile | 3 +-
.../drivers/net/bonding/mode-2-recovery-updelay.sh | 45 ----------------------
...e-1-recovery-updelay.sh => recovery-updelay.sh} | 13 +++----
3 files changed, 7 insertions(+), 54 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/bonding/Makefile b/tools/testing/selftests/drivers/net/bonding/Makefile
index e337c099fb40..c186310c2d6e 100644
--- a/tools/testing/selftests/drivers/net/bonding/Makefile
+++ b/tools/testing/selftests/drivers/net/bonding/Makefile
@@ -15,9 +15,8 @@ TEST_PROGS := \
bond_stacked_header_parse.sh \
bond_vlan_real_dev.sh \
dev_addr_lists.sh \
- mode-1-recovery-updelay.sh \
- mode-2-recovery-updelay.sh \
netcons_over_bonding.sh \
+ recovery-updelay.sh \
# end of TEST_PROGS
TEST_FILES := \
diff --git a/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh b/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh
deleted file mode 100755
index 2d275b3e47dd..000000000000
--- a/tools/testing/selftests/drivers/net/bonding/mode-2-recovery-updelay.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0
-
-# Regression Test:
-# When the bond is configured with down/updelay and the link state of
-# slave members flaps if there are no remaining members up the bond
-# should immediately select a member to bring up. (from bonding.txt
-# section 13.1 paragraph 4)
-#
-# +-------------+ +-----------+
-# | client | | switch |
-# | | | |
-# | +--------| link1 |-----+ |
-# | | +-------+ | |
-# | | | | | |
-# | | +-------+ | |
-# | | bond | link2 | Br0 | |
-# +-------------+ +-----------+
-# 172.20.2.1 172.20.2.2
-
-
-REQUIRE_MZ=no
-REQUIRE_JQ=no
-NUM_NETIFS=0
-lib_dir=$(dirname "$0")
-source "$lib_dir"/../../../net/forwarding/lib.sh
-source "$lib_dir"/lag_lib.sh
-
-cleanup()
-{
- lag_cleanup
-}
-
-trap cleanup 0 1 2
-
-lag_setup_network
-test_bond_recovery mode 2 miimon 100 updelay 0
-test_bond_recovery mode 2 miimon 100 updelay 200
-test_bond_recovery mode 2 miimon 100 updelay 500
-test_bond_recovery mode 2 miimon 100 updelay 1000
-test_bond_recovery mode 2 miimon 100 updelay 2000
-test_bond_recovery mode 2 miimon 100 updelay 5000
-test_bond_recovery mode 2 miimon 100 updelay 10000
-
-exit "$EXIT_STATUS"
diff --git a/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh b/tools/testing/selftests/drivers/net/bonding/recovery-updelay.sh
similarity index 72%
rename from tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh
rename to tools/testing/selftests/drivers/net/bonding/recovery-updelay.sh
index 9d26ab4cad0b..05edf9915cc0 100755
--- a/tools/testing/selftests/drivers/net/bonding/mode-1-recovery-updelay.sh
+++ b/tools/testing/selftests/drivers/net/bonding/recovery-updelay.sh
@@ -34,12 +34,11 @@ cleanup()
trap cleanup 0 1 2
lag_setup_network
-test_bond_recovery mode 1 miimon 100 updelay 0
-test_bond_recovery mode 1 miimon 100 updelay 200
-test_bond_recovery mode 1 miimon 100 updelay 500
-test_bond_recovery mode 1 miimon 100 updelay 1000
-test_bond_recovery mode 1 miimon 100 updelay 2000
-test_bond_recovery mode 1 miimon 100 updelay 5000
-test_bond_recovery mode 1 miimon 100 updelay 10000
+
+for mode in 1 2 3; do
+ for delay in 0 200 500 1000 2000 5000 10000; do
+ test_bond_recovery mode "${mode}" miimon 100 updelay "${delay}"
+ done
+done
exit "$EXIT_STATUS"
--
2.56.0
Technical Details
Message-ID:
<20261126-bond_broadcast_updelay-v1-3-188e5538d6ca@kylinos.cn>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371826-linux-kernel-netdev=dewy.ruReferences:
<20261126-bond_broadcast_updelay-v1-0-188e5538d6ca@kylinos.cn>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371826-linux-kernel-netdev=dewy.ru From: hangbin.liu@linux.dev (Hangbin Liu) Newsgroups: linux.kernel.netdev Subject: [PATCH net 3/3] selftests: bonding: add recovery updelay test for broadcast mode Date: Thu, 26 Nov 2026 10:30:57 +0800 Organization: Usenet Network Message-ID: <20261126-bond_broadcast_updelay-v1-3-188e5538d6ca@kylinos.cn> References: <20261126-bond_broadcast_updelay-v1-0-188e5538d6ca@kylinos.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="361716"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:5kPV4uBM444W5p69neDrKMzD1po= sha256:CHPGPpqNCkpKAqojQKCtlHi6+RAP3sw1sHNAUeB3PhY= sha1:5JJKWUQjtk80x/aF5p80h67B5wg= sha256:BthPnA73XsOAwWMe3ckBmlNZrTbgW7WVfcy45GP7ehE= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id C4BD6125EA3; Thu, 26 Nov 2026 05:31:53 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.151 X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=linux.dev X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O98rBuOqbPAH; Thu, 26 Nov 2026 05:31:50 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-371826-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id CF997125EAF; Thu, 26 Nov 2026 05:31:41 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id D30446043AD; Thu, 26 Nov 2026 02:31:40 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795660287; b=m2vShwOp3d30Fkz2q7EadVe88kDqQrNqnMAjRHrRSbkmwG7T5HP4rkN6eciMSQqon8/u 1Y9KRYXvN2XTA5FgNeNhNAw1cz2q+8yJ6ShZq2R4RJufYegR27mbn+uMOJItrCZ4Whm26 N3mHc5UioIQmNjkyIoHXAwCQVVvvAw6EJHpznnsVX6rRKS71UhorNyalQq8qpP0CSB5nl 5okQ4TyVH0hI1kjWzyFAKXqQKlKebf214WmKAgzBQcrSxL7vIX4P1Mt1cd5c2zFQfMOf3 0j3mV8zUstjCUScE5KmA8N630qb0bE0NmSke4dV0huXIKmO1GQjKxYLap5EK07jRbfA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795660287; h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature: X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:From:Date: Subject:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer; bh=XoNUqoMOUR4pNg64kYKOFS5cc8mxi4fzlWjxyaA/0Jk=; b=YsoC7H2m6B01E//W+/nTsdxoHX3Na7uPRBqOtjmWUgbsTvA6x9GTz1E9Se9gx9gQhkKD 8fei8+xRqajYH6X7wtspftVDPmmGoP8e6Epc2GQR/YUyxi0kKkiII/4mTLat8ojK9fVE3 zadorAYvOqPYkrbX6HorQUU97wkYDYOnZQb+4wCUCbWIBW8UTkQdD0og35qWmYWKiV4cA 0R6a1UTRJSokXmFgkfpYVeI9Rqllu5hoGiyRJ84WFc6hmU0RU/w36h6oXBgg7qoCmYtUc gZkgPfSxLIaVPx77RGVxIk11+n4GAf2KMY3BemjJ5ZSESaFqP8z7GHDw5sAaBuC6t+g== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=HrDUfDaD; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C53D606A689; Thu, 26 Nov 2026 02:31:27 +0000 (UTC) X-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=HrDUfDaD X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.60 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795660286; b=l4VJ6vImXAJMgx3PMJ4VM3ijfrHALxCKxf4b2fe+D8t8noDW+1Q9M0k0GEblw0LqfP/T o6J/Bu+a/WgySOvxDnNqyOyAbrJBDTaT3CkyVN578XmaBDl1NKhc42rgSZW9ZfNNvgOm4 G2fjL1xr5HzTHD+B4QbSq7SC1kzaR0k4JLDoSdLrlFusJR74e+E1lAkeVINxA+s/yEY8L gr5zFrzRFbTX0+7w/YpDAsywmPTijVMmwXJqzg6ZS1aswbmgeYA5g49Rf0VAYptGttNaK UFPuMSNqQf2P7F5yYUTIC3Zci0UlcySZ7IxKhFLUGiunTItCJyK/CDDc7ValO2BjErw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795660286; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer; bh=XoNUqoMOUR4pNg64kYKOFS5cc8mxi4fzlWjxyaA/0Jk=; b=04W4Tqa9LzZxuLa2i9r7EsW7ni0AM4d8IsOW8t31CsnDOWyGTAGjsds7VS5B5x6QM2cy f2mTOHtw/4IXRNABpofylYZ42bdI/r+Wt8xeiHPdPlUSMVGedz5t5n2AXTWO6++EZH8Pf kO8XUEk7idj6rygmTDUcjUSu4i+X6gXxJwBE5gQGxLd9rPrjwgKUnsaEjWqtlP4nhkxN6 KAfboJ4zrembuaSajml8/d3bxaAmB26Pin19ZMOmjC0HSqGYl+S04pi5rOtCe1wJDtfJA 9XbLbsQFH20BDLzunreNxI+QGDjaC0FYWuWhPHhlIQ6BDFvVHHCK/9EiqWj/fLGM2Kg== X-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=HrDUfDaD; arc=none smtp.remote-ip=95.215.58.60 X-Received: from mta1.migadu.com (out-60.mta1.migadu.com [95.215.58.60]) (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 AA78C606A331 for <netdev@vger.kernel.org>; Thu, 26 Nov 2026 02:31:25 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AA78C606A331 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-DKIM-Signature: a=rsa-sha256; bh=9ytP9VIUcsucr3RFXON7iMevk/B43pe2qF9qb3+uaGc=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1795660283; v=1; x=1796265083; b=HrDUfDaDQI5v0C4c3EjTC6lOo5ikPvn3xq8modtIXr/rMeTcCmRz4hXOL6vMcT7Y7EuUzH8k MFW/K3XQnOYHL1zowMekC2FmH8V4806jzTVdURZxLslZ91PL874e0p1Eu/ufvHAVoapfKfhEDTf chhrFKsx/4z18U8kBiNs0MIY= X-Envelope-To: netdev@vger.kernel.org X-Received: by mta11.migadu.com with ESMTPS id e78637e12af0c6eb; Thu, 26 Nov 2026 02:31:23 +0000 X-Mizu-Trace-ID: e78637e12af0c6eb X-Migadu-Flow: FLOW_OUT X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261126-bond_broadcast_updelay-v1-0-188e5538d6ca@kylinos.cn> X-Cc: "jiangjiehua (A)" <jiangjiehua1@huawei.com>, Hangbin Liu <hangbin.liu@linux.dev>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Hangbin Liu <hangbin.liu@linux.dev> X-Mailer: b4 0.16.0