From: Simon Horman <horms@kernel.org>
To: Yuyang Huang <yuyanghuang@google.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] selftest: add selftest for anycast notifications
Date: Wed, 18 Jun 2025 19:20:29 +0100 [thread overview]
Message-ID: <20250618182029.GV1699@horms.kernel.org> (raw)
In-Reply-To: <20250618104025.3463656-1-yuyanghuang@google.com>
On Wed, Jun 18, 2025 at 07:40:25PM +0900, Yuyang Huang wrote:
> This commit adds a new kernel selftest to verify RTNLGRP_IPV6_ACADDR
> notifications. The test works by adding/removing a dummy interface,
> enabling packet forwarding, and then confirming that user space can
> correctly receive anycast notifications.
>
> The test relies on the iproute2 version to be 6.13+.
>
> Tested by the following command:
> $ vng -v --user root --cpus 16 -- \
> make -C tools/testing/selftests TARGETS=net
> TEST_PROGS=rtnetlink_notification.sh \
> TEST_GEN_PROGS="" run_tests
>
> Signed-off-by: Yuyang Huang <yuyanghuang@google.com>
> ---
> .../selftests/net/rtnetlink_notification.sh | 52 +++++++++++++++++--
> 1 file changed, 47 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/selftests/net/rtnetlink_notification.sh b/tools/testing/selftests/net/rtnetlink_notification.sh
...
> @@ -18,12 +20,11 @@ kci_test_mcast_addr_notification()
> local tmpfile
> local monitor_pid
> local match_result
> - local test_dev="test-dummy1"
>
> tmpfile=$(mktemp)
> defer rm "$tmpfile"
>
> - ip monitor maddr > $tmpfile &
> + ip monitor maddr > "$tmpfile" &
> monitor_pid=$!
> defer kill_process "$monitor_pid"
>
> @@ -32,7 +33,7 @@ kci_test_mcast_addr_notification()
> if [ ! -e "/proc/$monitor_pid" ]; then
> RET=$ksft_skip
> log_test "mcast addr notification: iproute2 too old"
> - return $RET
> + return "$RET"
> fi
>
> ip link add name "$test_dev" type dummy
> @@ -53,7 +54,48 @@ kci_test_mcast_addr_notification()
> RET=$ksft_fail
> fi
> log_test "mcast addr notification: Expected 4 matches, got $match_result"
> - return $RET
> + return "$RET"
> +}
...
> @@ -67,4 +109,4 @@ require_command ip
>
> tests_run
>
> -exit $EXIT_STATUS
> +exit "$EXIT_STATUS"
Hi,
While I like the changes above (that I haven't trimmed-out)
these seem to be clean-ups that aren't strictly related
to the subject of this patch. IOW, they don't belong in this patch
(but could be a separate patch).
--
pw-bot: changes-requested
next prev parent reply other threads:[~2025-06-18 18:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 10:40 [PATCH net-next] selftest: add selftest for anycast notifications Yuyang Huang
2025-06-18 18:20 ` Simon Horman [this message]
2025-06-18 23:55 ` Yuyang Huang
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=20250618182029.GV1699@horms.kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=yuyanghuang@google.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).