mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lawrence Lee" <lfqlee314@gmail.com>
To: <netdev-bot+sashiko@kernel.org>
Cc: <dsahern@kernel.org>, <idosch@nvidia.com>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<horms@kernel.org>, <rdunlap@infradead.org>,
	<netdev@vger.kernel.org>, <aajith@arista.com>, <roopa@nvidia.com>,
	<jhpark1013@gmail.com>, <corbet@lwn.net>,
	<skhan@linuxfoundation.org>, <shuah@kernel.org>,
	<linux-doc@vger.kernel.org>, <linux-kselftest@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v3 2/2] selftests: net: test untracked NA recovery of FAILED neighbors
Date: Wed, 23 Sep 2026 01:20:35 +0000	[thread overview]
Message-ID: <DLMAUZF2EY4Z.2FZ7BR3O62LAS@gmail.com> (raw)
In-Reply-To: <179011668031.2160803.1030111847497325728@kernel.org>

On Tue Sep 22, 2026 at 10:38 PM UTC,  wrote:
> [Severity: Low]
> tcpdump is now a background child, and cleanup_tcpdump() is the only place
> that kills and reaps it. Can that child be left running when the script
> leaves through a path that never reaches cleanup()?
>
> cleanup_tcpdump() is reached only from cleanup(), which runs at the tail of
> test_unsolicited_na_combination() after log_test() returns:
>
> 	log_test "${rc}" 0 "${test_msg[*]}"
> 	cleanup
>
> log_test() can exit first when the script is run with -p or -P and the
> operator answers 'q':
>
> 	if [ "${PAUSE}" = "yes" ]; then
> 		echo
> 		echo "hit enter to continue, 'q' to quit"
> 		read a
> 		[ "$a" = "q" ] && exit 1
> 	fi
>
> setup() also runs under set -e, so a failing sysctl there (for example
> accept_untracked_na=2 on a kernel without mode 2) exits the shell directly.
> There is no trap cleanup EXIT INT TERM anywhere in the file, so in those
> cases the two namespaces from setup_ns and both mktemp files are left
> behind, and if the failure happens between start_tcpdump() and
> wait_tcpdump() (for instance the new slowwait 5 grep for "listening on"
> timing out, or host_link_up failing) a live timeout 15s tcpdump keeps a
> packet socket and a netns reference until its own timeout expires.
>
> Would adding a trap that calls cleanup on EXIT, INT and TERM be reasonable
> here?
>

I would lean towards no, since tcpdump already times out on its own and 
any orphaned tempfiles or netns are a pre-existing issue. No change 
planned.

> [Severity: Low]
> This isn't a problem introduced by this patch, but the absent-entry branch
> of verify_ndisc() still discards the exit status of ip neigh show and only
> tests that the output is empty. If the command itself fails, is the empty
> output then reported as a pass without the neighbour table ever having been
> read? The same pattern is present in the baseline version of the function,
> so this is pre-existing; the new expected_state branch fails closed. Would
> checking the exit status of the query in the else branch be worth folding
> in while this function is being touched?
>

Pre-existing issue, will leave as-is

> [Severity: Medium]
> The new rc=$? capture also repairs a reporting bug that existed before this
> patch. In the baseline the sequence was:
>
> 	test_unsolicited_na_common $1 $2 $3
> 	test_msg=("test_unsolicited_na: "
> 		"drop_unsolicited_na=$1 "
> 		"accept_untracked_na=$2 "
> 		"forwarding=$3")
> 	log_test $? 0 "${test_msg[*]}"
>
> The array assignment between the helper call and log_test sets $? to 0
> (none of the assigned words contain a command substitution), so log_test
> always received 0 and all eight existing combinations reported OK no matter
> what verify_ndisc returned. Capturing rc immediately after
> test_unsolicited_na_common() changes the pass/fail semantics of those eight
> pre-existing cases so they can now actually fail.
>
> The changelog describes only the new FAILED-neighbour coverage and does not
> mention that the existing reporting was broken, and there is no Fixes: tag
> (git blame points the log_test $? line at f9a2fb73318eb).
>
> Would it make sense to split this into its own patch with a Fixes: tag, so
> it can be applied and backported independently of the new mode 2 and
> FAILED-state coverage, which needs kernel features not present in older
> trees?
>

An entirely new patch submission seems like overkill for this. I'll 
update the commit message to mention this change and add the Fixes tag.

pw-bot: changes-requested


      reply	other threads:[~2026-09-23  1:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 22:13 [PATCH net-next v3 0/2] ipv6: update NUD_FAILED neighbors from NA messages Lawrence Lee
2026-09-18 22:13 ` [PATCH net-next v3 1/2] " Lawrence Lee
2026-09-20  8:09   ` Ido Schimmel
2026-09-22 22:37   ` netdev-bot+sashiko
2026-09-22 22:57     ` Lawrence Lee
2026-09-18 22:13 ` [PATCH net-next v3 2/2] selftests: net: test untracked NA recovery of FAILED neighbors Lawrence Lee
2026-09-22 22:38   ` netdev-bot+sashiko
2026-09-23  1:20     ` Lawrence Lee [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=DLMAUZF2EY4Z.2FZ7BR3O62LAS@gmail.com \
    --to=lfqlee314@gmail.com \
    --cc=aajith@arista.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=jhpark1013@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=roopa@nvidia.com \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    /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

all inboxes | Powered by JetHome®