From: Geliang Tang <geliang.tang@suse.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v2 1/4] selftests: mptcp: make evts global in userspace_pm
Date: Mon, 28 Nov 2022 17:06:19 +0800 [thread overview]
Message-ID: <20221128090619.GA16009@localhost> (raw)
In-Reply-To: <e1f32a3438e563718778e393394fd5ae036444cb.camel@redhat.com>
On Mon, Nov 28, 2022 at 09:04:44AM +0100, Paolo Abeni wrote:
> Hi,
>
> On Fri, 2022-11-25 at 21:40 +0800, Geliang Tang wrote:
> > @@ -134,18 +140,25 @@ make_connection()
> >
> > # Capture netlink events over the two network namespaces running
> > # the MPTCP client and server
> > - local client_evts
> > - client_evts=$(mktemp)
> > + if [ -z "$client_evts" ]; then
> > + client_evts=$(mktemp)
> > + fi
> > :>"$client_evts"
> > + if [ $client_evts_pid -ne 0 ]; then
> > + kill_wait $client_evts_pid
> > + fi
> > ip netns exec "$ns2" ./pm_nl_ctl events >> "$client_evts" 2>&1 &
> > - local client_evts_pid=$!
> > - local server_evts
> > - server_evts=$(mktemp)
> > + client_evts_pid=$!
> > + if [ -z "$server_evts" ]; then
> > + server_evts=$(mktemp)
> > + fi
> > :>"$server_evts"
> > + if [ $server_evts_pid -ne 0 ]; then
> > + kill_wait $server_evts_pid
> > + fi
> > ip netns exec "$ns1" ./pm_nl_ctl events >> "$server_evts" 2>&1 &
> > - local server_evts_pid=$!
> > + server_evts_pid=$!
> > sleep 0.5
> > -
>
> Minor nit: I would not remove this empty line here.
This has been removed in v3 in the ML.
>
> > # Run the server
> > ip netns exec "$ns1" \
> > ./mptcp_connect -s MPTCP -w 300 -p $app_port -l $listen_addr > /dev/null 2>&1 &
> > @@ -161,7 +174,6 @@ make_connection()
> > sleep 1
> >
> > # Capture client/server attributes from MPTCP connection netlink events
> > - kill_wait $client_evts_pid
> >
> > local client_token
> > local client_port
> > @@ -173,12 +185,11 @@ make_connection()
> > client_port=$(sed --unbuffered -n 's/.*\(sport:\)\([[:digit:]]*\).*$/\2/p;q' "$client_evts")
> > client_serverside=$(sed --unbuffered -n 's/.*\(server_side:\)\([[:digit:]]*\).*$/\2/p;q'\
> > "$client_evts")
> > - kill_wait $server_evts_pid
> > server_token=$(grep "type:1," "$server_evts" |
> > sed --unbuffered -n 's/.*\(token:\)\([[:digit:]]*\).*$/\2/p;q')
> > server_serverside=$(grep "type:1," "$server_evts" |
> > sed --unbuffered -n 's/.*\(server_side:\)\([[:digit:]]*\).*$/\2/p;q')
> > - rm -f "$client_evts" "$server_evts" "$file"
> > + rm -f "$file"
>
> At this point is better to move even 'file' as a global variable, for
> the same reason as 'evts'
I just sent a squash-to patch against v3 to fix this.
Thanks,
-Geliang
>
> >
> > if [ "$client_token" != "" ] && [ "$server_token" != "" ] && [ "$client_serverside" = 0 ] &&
> > [ "$server_serverside" = 1 ]
>
> Thanks!
>
> Paolo
>
next prev parent reply other threads:[~2022-11-28 9:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-25 13:40 [PATCH mptcp-next v2 0/4] cleanups for pm listener event tests Geliang Tang
2022-11-25 13:40 ` [PATCH mptcp-next v2 1/4] selftests: mptcp: make evts global in userspace_pm Geliang Tang
2022-11-28 8:04 ` Paolo Abeni
2022-11-28 9:06 ` Geliang Tang [this message]
2022-11-25 13:40 ` [PATCH mptcp-next v2 2/4] Squash to "selftests: mptcp: listener test for userspace PM" Geliang Tang
2022-11-25 13:40 ` [PATCH mptcp-next v2 3/4] selftests: mptcp: make evts global in mptcp_join Geliang Tang
2022-11-25 13:40 ` [PATCH mptcp-next v2 4/4] Squash to "selftests: mptcp: listener test for in-kernel PM" Geliang Tang
2022-11-25 15:54 ` Squash to "selftests: mptcp: listener test for in-kernel PM": Tests Results MPTCP CI
2022-11-28 10:09 ` MPTCP CI
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=20221128090619.GA16009@localhost \
--to=geliang.tang@suse.com \
--cc=mptcp@lists.linux.dev \
--cc=pabeni@redhat.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