[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250927095832.1651104-1-kuniyu@google.com>
Date: Sat, 27 Sep 2025 09:57:59 +0000
From: Kuniyuki Iwashima <kuniyu@...gle.com>
To: kuniyu@...gle.com
Cc: davem@...emloft.net, edumazet@...gle.com, horms@...nel.org,
kuba@...nel.org, kuni1840@...il.com, netdev@...r.kernel.org,
pabeni@...hat.com
Subject: Re: [PATCH v1 net-next 07/12] selftest: packetdrill: Import opt34/icmp-before-accept.pkt.
From: Kuniyuki Iwashima <kuniyu@...gle.com>
Date: Fri, 26 Sep 2025 21:29:01 +0000
> This imports the non-experimental version of icmp-before-accept.pkt.
>
> This file tests the scenario where an ICMP unreachable packet for a
> not-yet-accept()ed socket changes its state to TCP_CLOSE, but the
> SYN data must be read without error, and the following read() returns
> EHOSTUNREACH.
>
> Note that this test support only IPv4 as icmp is used.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...gle.com>
> ---
> ...tcp_fastopen_server_icmp-before-accept.pkt | 49 +++++++++++++++++++
> 1 file changed, 49 insertions(+)
> create mode 100644 tools/testing/selftests/net/packetdrill/tcp_fastopen_server_icmp-before-accept.pkt
>
> diff --git a/tools/testing/selftests/net/packetdrill/tcp_fastopen_server_icmp-before-accept.pkt b/tools/testing/selftests/net/packetdrill/tcp_fastopen_server_icmp-before-accept.pkt
> new file mode 100644
> index 000000000000..d5543672e2bd
> --- /dev/null
> +++ b/tools/testing/selftests/net/packetdrill/tcp_fastopen_server_icmp-before-accept.pkt
> @@ -0,0 +1,49 @@
> +// SPDX-License-Identifier: GPL-2.0
> +//
> +// Send an ICMP host_unreachable pkt to a pending SYN_RECV req.
> +//
> +// If it's a TFO req, the ICMP error will cause it to switch
> +// to TCP_CLOSE state but remains in the acceptor queue.
> +
> +--ip_version=ipv4
Sorry, I noticed selftest failed in patchwork while this test
itself succeeds.
I forgot to update ktap_set_plan in ksft_runner.sh in a5c10aa3d1ba.
I'll post v2 with this patch after 24h timer.
commit f4f03e74501ef4283d27716be37b5effa2b7e4db
Author: Kuniyuki Iwashima <kuniyu@...gle.com>
Date: Sat Sep 27 09:41:42 2025
selftest: packetdrill: Set ktap_set_plan properly for single protocol test.
The cited commit forgot to update the ktap_set_plan call.
ktap_set_plan sets the number of tests (KSFT_NUM_TESTS), which must
match the number of executed tests (KTAP_CNT_PASS + KTAP_CNT_SKIP +
KTAP_CNT_XFAIL) in ktap_finished.
Otherwise, the selftest exit()s with 1.
Let's adjust KSFT_NUM_TESTS based on supported protocols.
While at it, misalignment is fixed up.
Fixes: a5c10aa3d1ba ("selftests/net: packetdrill: Support single protocol test.")
Signed-off-by: Kuniyuki Iwashima <kuniyu@...gle.com>
diff --git a/tools/testing/selftests/net/packetdrill/ksft_runner.sh b/tools/testing/selftests/net/packetdrill/ksft_runner.sh
index 0ae6eeeb1a8e..3fa7c7f66caf 100755
--- a/tools/testing/selftests/net/packetdrill/ksft_runner.sh
+++ b/tools/testing/selftests/net/packetdrill/ksft_runner.sh
@@ -48,11 +48,11 @@ elif [[ ! "$ip_versions" =~ ^ipv[46]$ ]]; then
fi
ktap_print_header
-ktap_set_plan 2
+ktap_set_plan $(echo $ip_versions | wc -w)
for ip_version in $ip_versions; do
unshare -n packetdrill ${ip_args[$ip_version]} ${optargs[@]} $script > /dev/null \
- && ktap_test_pass $ip_version || $failfunc $ip_version
+ && ktap_test_pass $ip_version || $failfunc $ip_version
done
ktap_finished
--
pw-bot: cr
Powered by blists - more mailing lists