MPTCP Archive mirror
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Mat Martineau <martineau@kernel.org>, Geliang Tang <geliang@kernel.org>
Cc: mptcp@lists.linux.dev, Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-next v3 3/3] selftests: mptcp: add last time actions tests
Date: Tue, 2 Apr 2024 10:58:54 +0200	[thread overview]
Message-ID: <5d0badac-bff9-4ffe-ab22-487c9cae1e57@kernel.org> (raw)
In-Reply-To: <5b22266f-922f-cfa3-f006-656262aa0351@kernel.org>

Hi Mat,

On 01/04/2024 20:21, Mat Martineau wrote:
> On Sat, 30 Mar 2024, Geliang Tang wrote:
> 
>> From: Geliang Tang <tanggeliang@kylinos.cn>
>>
>> This patch adds a new helper chk_msk_info() to show the counters in
>> mptcp_info of the given infos, and check that the timestamps move
>> forward. Use it to show newly added last_data_sent, last_data_recv
>> and last_ack_recv in mptcp_info in diag.sh.
>>
>> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
>> ---
>> tools/testing/selftests/net/mptcp/diag.sh | 29 +++++++++++++++++++++++
>> 1 file changed, 29 insertions(+)
>>
>> diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/
>> testing/selftests/net/mptcp/diag.sh
>> index bc97ab33a00e..2f9f734015b4 100755
>> --- a/tools/testing/selftests/net/mptcp/diag.sh
>> +++ b/tools/testing/selftests/net/mptcp/diag.sh
>> @@ -200,6 +200,34 @@ chk_msk_cestab()
>>          "${expected}" "${msg}" ""
>> }
>>
>> +chk_msk_info()
>> +{
>> +    local port="${1}"
>> +    local info
>> +
>> +    for info in "${@:2}"; do
>> +        local cnt1 cnt2 msg
>> +
>> +        cnt1=$(ss -N ${ns} -inHM dport ${port} |
>> mptcp_lib_get_info_value "$info" "$info")
>> +        sleep 0.5
> 
> Hi Geliang -
> 
> With the loop structured this way, it sleeps 3 times. You could collect
> the first timestamp for all three values (last_data_sent last_data_recv
> last_ack_recv), then sleep once, then get all 3 "after" timestamps.
> 
> (Unless Matthieu doesn't care about the extra test time :) )

Good idea to have only one sleep!

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  reply	other threads:[~2024-04-02  8:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-30  7:46 [PATCH mptcp-next v3 0/3] display "last time" actions info Geliang Tang
2024-03-30  7:46 ` [PATCH mptcp-next v3 1/3] mptcp: add last time fields in mptcp_sock Geliang Tang
2024-03-30  7:46 ` [PATCH mptcp-next v3 2/3] mptcp: add last time fields in mptcp_info Geliang Tang
2024-04-01 18:02   ` Mat Martineau
2024-03-30  7:46 ` [PATCH mptcp-next v3 3/3] selftests: mptcp: add last time actions tests Geliang Tang
2024-04-01 18:21   ` Mat Martineau
2024-04-02  8:58     ` Matthieu Baerts [this message]
2024-03-30  8:40 ` [PATCH mptcp-next v3 0/3] display "last time" actions info 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=5d0badac-bff9-4ffe-ab22-487c9cae1e57@kernel.org \
    --to=matttbe@kernel.org \
    --cc=geliang@kernel.org \
    --cc=martineau@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=tanggeliang@kylinos.cn \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).