To be able to find which capture files have been produced after several
runs.
This suffix was not printed anywhere before.
While at it, always use the same prefix by taking info from ns1, instead
of "$connector_ns", which is sometimes ns1, sometimes ns2 in the
subtests.
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
tools/testing/selftests/net/mptcp/mptcp_connect.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
index 5e3c56253274a1f938d2ed9986c4290fcea8b96b..19e2bd3000ec8be470a34d503ec034404e798fec 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
@@ -211,6 +211,11 @@ if $checksum; then
done
fi
+if $capture; then
+ rndh="${ns1:4}"
+ mptcp_lib_pr_info "Packet capture files will have this prefix: ${rndh}-"
+fi
+
set_ethtool_flags() {
local ns="$1"
local dev="$2"
@@ -361,7 +366,6 @@ do_transfer()
if $capture; then
local capuser
- local rndh="${connector_ns:4}"
if [ -z $SUDO_USER ] ; then
capuser=""
else
--
2.51.0
Hi Matt, Thanks for this v2. On Fri, 2025-09-05 at 20:18 +0200, Matthieu Baerts (NGI0) wrote: > To be able to find which capture files have been produced after > several > runs. > > This suffix was not printed anywhere before. > > While at it, always use the same prefix by taking info from ns1, > instead > of "$connector_ns", which is sometimes ns1, sometimes ns2 in the > subtests. > > Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> > --- > tools/testing/selftests/net/mptcp/mptcp_connect.sh | 6 +++++- Just wondering, is it necessary to synchronize this modification to mptcp_join.sh to maintain consistency? -Geliang > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh > b/tools/testing/selftests/net/mptcp/mptcp_connect.sh > index > 5e3c56253274a1f938d2ed9986c4290fcea8b96b..19e2bd3000ec8be470a34d503ec > 034404e798fec 100755 > --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh > +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh > @@ -211,6 +211,11 @@ if $checksum; then > done > fi > > +if $capture; then > + rndh="${ns1:4}" > + mptcp_lib_pr_info "Packet capture files will have this > prefix: ${rndh}-" > +fi > + > set_ethtool_flags() { > local ns="$1" > local dev="$2" > @@ -361,7 +366,6 @@ do_transfer() > > if $capture; then > local capuser > - local rndh="${connector_ns:4}" > if [ -z $SUDO_USER ] ; then > capuser="" > else
Hi Geliang, On 06/09/2025 01:39, Geliang Tang wrote: > Hi Matt, > > Thanks for this v2. > > On Fri, 2025-09-05 at 20:18 +0200, Matthieu Baerts (NGI0) wrote: >> To be able to find which capture files have been produced after >> several >> runs. >> >> This suffix was not printed anywhere before. >> >> While at it, always use the same prefix by taking info from ns1, >> instead >> of "$connector_ns", which is sometimes ns1, sometimes ns2 in the >> subtests. >> >> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> >> --- >> tools/testing/selftests/net/mptcp/mptcp_connect.sh | 6 +++++- > > Just wondering, is it necessary to synchronize this modification to > mptcp_join.sh to maintain consistency? I don't think that's needed: there is already a similar message in mptcp_join.sh: Capturing traffic for test $MPTCP_LIB_TEST_COUNTER into $capfile Cheers, Matt -- Sponsored by the NGI0 Core fund.
Hi Matt, On Sat, 2025-09-06 at 15:58 +0200, Matthieu Baerts wrote: > Hi Geliang, > > On 06/09/2025 01:39, Geliang Tang wrote: > > Hi Matt, > > > > Thanks for this v2. > > > > On Fri, 2025-09-05 at 20:18 +0200, Matthieu Baerts (NGI0) wrote: > > > To be able to find which capture files have been produced after > > > several > > > runs. > > > > > > This suffix was not printed anywhere before. > > > > > > While at it, always use the same prefix by taking info from ns1, > > > instead > > > of "$connector_ns", which is sometimes ns1, sometimes ns2 in the > > > subtests. > > > > > > Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> > > > --- > > > tools/testing/selftests/net/mptcp/mptcp_connect.sh | 6 +++++- > > > > Just wondering, is it necessary to synchronize this modification to > > mptcp_join.sh to maintain consistency? > > I don't think that's needed: there is already a similar message in > mptcp_join.sh: > > Capturing traffic for test $MPTCP_LIB_TEST_COUNTER into $capfile Thank you for your explanation. -Geliang > > Cheers, > Matt
© 2016 - 2025 Red Hat, Inc.