From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jonathan Toppins <jtoppins@redhat.com>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>, Liang Li <liali@redhat.com>
Subject: Re: [PATCH net 3/3] selftests: bonding: add arp validate test
Date: Thu, 30 Mar 2023 21:00:20 -0700 [thread overview]
Message-ID: <21315.1680235220@famine> (raw)
In-Reply-To: <20230329101859.3458449-4-liuhangbin@gmail.com>
Hangbin Liu <liuhangbin@gmail.com> wrote:
>This patch add bonding arp validate tests with mode active backup,
>monitor arp_ip_target and ns_ip6_target. It also checks mii_status
>to make sure all slaves are UP.
>
>Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
>---
> .../drivers/net/bonding/bond_options.sh | 55 +++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
>diff --git a/tools/testing/selftests/drivers/net/bonding/bond_options.sh b/tools/testing/selftests/drivers/net/bonding/bond_options.sh
>index 431ce0e45e3c..4909d529210c 100755
>--- a/tools/testing/selftests/drivers/net/bonding/bond_options.sh
>+++ b/tools/testing/selftests/drivers/net/bonding/bond_options.sh
>@@ -5,6 +5,7 @@
>
> ALL_TESTS="
> prio
>+ arp_validate
> "
>
> REQUIRE_MZ=no
>@@ -207,6 +208,60 @@ prio()
> done
> }
>
>+arp_validate_test()
>+{
>+ local param="$1"
>+ RET=0
>+
>+ # create bond
>+ bond_reset "${param}"
>+
>+ bond_check_connection
>+ [ $RET -ne 0 ] && log_test "arp_validate" "$retmsg"
>+
>+ # wait for a while to make sure the mii status stable
>+ sleep 5
>+ for i in $(seq 0 2); do
>+ mii_status=$(cmd_jq "ip -n ${s_ns} -j -d link show eth$i" ".[].linkinfo.info_slave_data.mii_status")
>+ if [ ${mii_status} != "UP" ]; then
>+ RET=1
>+ log_test "arp_validate" "interface eth$i mii_status $mii_status"
>+ fi
>+ done
>+}
>+
>+arp_validate_arp()
>+{
>+ local mode=$1
>+ local val
>+ for val in $(seq 0 6); do
>+ arp_validate_test "mode $mode arp_interval 1000 arp_ip_target ${sw_ip4} arp_validate $val"
>+ log_test "arp_validate" "mode $mode arp_ip_target arp_validate $val"
>+ done
>+}
>+
>+arp_validate_ns()
>+{
>+ local mode=$1
>+ local val
>+
>+ if skip_ns; then
>+ log_test_skip "arp_validate ns" "Current iproute or kernel doesn't support bond option 'ns_ip6_target'."
>+ return 0
>+ fi
>+
>+ for val in $(seq 0 6); do
>+ arp_validate_test "mode $mode arp_interval 1000 ns_ip6_target ${sw_ip6} arp_validate $val"
>+ log_test "arp_validate" "mode $mode ns_ip6_target arp_validate $val"
>+ done
>+}
>+
>+arp_validate()
>+{
>+ arp_validate_arp "active-backup"
>+ arp_validate_ns "active-backup"
>+}
>+
> trap cleanup EXIT
>
> setup_prepare
>--
>2.38.1
>
prev parent reply other threads:[~2023-03-31 4:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 10:18 [PATCH net 0/3] bonding: fix ns validation on backup slaves Hangbin Liu
2023-03-29 10:18 ` [PATCH net 1/3] " Hangbin Liu
2023-03-30 16:46 ` Jonathan Toppins
2023-03-31 4:02 ` Jay Vosburgh
2023-03-29 10:18 ` [PATCH net 2/3] selftests: bonding: re-format bond option tests Hangbin Liu
2023-03-30 16:45 ` Jonathan Toppins
2023-03-31 2:31 ` Hangbin Liu
2023-04-04 2:28 ` Hangbin Liu
2023-04-04 16:34 ` Jonathan Toppins
2023-04-05 9:57 ` Hangbin Liu
2023-04-06 0:23 ` Jonathan Toppins
2023-03-31 3:55 ` Jay Vosburgh
2023-03-29 10:18 ` [PATCH net 3/3] selftests: bonding: add arp validate test Hangbin Liu
2023-03-30 16:48 ` Jonathan Toppins
2023-03-31 4:00 ` Jay Vosburgh [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=21315.1680235220@famine \
--to=jay.vosburgh@canonical.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jtoppins@redhat.com \
--cc=kuba@kernel.org \
--cc=liali@redhat.com \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).