From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: MPTCP Upstream <mptcp@lists.linux.dev>
Cc: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Subject: [PATCH mptcp-next 2/4] selftests: mptcp: connect: avoid double packet traces
Date: Sat, 08 Nov 2025 15:20:28 +0100 [thread overview]
Message-ID: <20251108-slft-timeout-stats-v1-2-c2234d277318@kernel.org> (raw)
In-Reply-To: <20251108-slft-timeout-stats-v1-0-c2234d277318@kernel.org>
When the same netns is used for the listener and the connector, no need
to take exactly the same packet trace twice, one is enough.
This avoids confusions when the traces are the same, and wasting
resources which might not help reproducing an issue.
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
tools/testing/selftests/net/mptcp/mptcp_connect.sh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
index 3a804abebd2c..1149bd150d6a 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
@@ -378,8 +378,10 @@ do_transfer()
ip netns exec ${listener_ns} tcpdump ${capopt} -w "${capfile}-listener.pcap" >> "${capout}" 2>&1 &
local cappid_listener=$!
- ip netns exec ${connector_ns} tcpdump ${capopt} -w "${capfile}-connector.pcap" >> "${capout}" 2>&1 &
- local cappid_connector=$!
+ if [ ${listener_ns} != ${connector_ns} ]; then
+ ip netns exec ${connector_ns} tcpdump ${capopt} -w "${capfile}-connector.pcap" >> "${capout}" 2>&1 &
+ local cappid_connector=$!
+ fi
sleep 1
fi
@@ -416,7 +418,9 @@ do_transfer()
if $capture; then
sleep 1
kill ${cappid_listener}
- kill ${cappid_connector}
+ if [ ${listener_ns} != ${connector_ns} ]; then
+ kill ${cappid_connector}
+ fi
fi
mptcp_lib_nstat_get "${listener_ns}"
--
2.51.0
next prev parent reply other threads:[~2025-11-08 14:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-08 14:20 [PATCH mptcp-next 0/4] selftests: mptcp: get stats just before timing out Matthieu Baerts (NGI0)
2025-11-08 14:20 ` [PATCH mptcp-next 1/4] selftests: mptcp: join: properly kill background tasks Matthieu Baerts (NGI0)
2025-11-11 2:46 ` Geliang Tang
2025-11-11 6:53 ` Matthieu Baerts
2025-11-11 8:17 ` Geliang Tang
2025-11-11 10:51 ` Matthieu Baerts
2025-11-12 10:00 ` Matthieu Baerts
2025-11-08 14:20 ` Matthieu Baerts (NGI0) [this message]
2025-11-08 14:20 ` [PATCH mptcp-next 3/4] selftests: mptcp: wait for port instead of sleep Matthieu Baerts (NGI0)
2025-11-08 14:20 ` [PATCH mptcp-next 4/4] selftests: mptcp: get stats just before timing out Matthieu Baerts (NGI0)
2025-11-13 7:15 ` Geliang Tang
2025-11-13 9:25 ` Matthieu Baerts
2025-11-13 7:25 ` Paolo Abeni
2025-11-13 9:30 ` Matthieu Baerts
2025-11-08 15:51 ` [PATCH mptcp-next 0/4] " MPTCP CI
2025-11-12 10:02 ` Geliang Tang
2025-11-12 10:35 ` Matthieu Baerts
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=20251108-slft-timeout-stats-v1-2-c2234d277318@kernel.org \
--to=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
/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