Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: mptcp@lists.linux.dev, Mat Martineau <martineau@kernel.org>,
	Geliang Tang <geliang@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 0/3] selftests: mptcp: add time per subtests in TAP output
Date: Wed, 4 Sep 2024 18:15:09 +0200	[thread overview]
Message-ID: <559e1458-b593-44c7-92b1-6946c57496c5@kernel.org> (raw)
In-Reply-To: <20240903162217.07c366c9@kernel.org>

Hi Jakub,

On 04/09/2024 01:22, Jakub Kicinski wrote:
> On Mon, 02 Sep 2024 13:13:03 +0200 Matthieu Baerts (NGI0) wrote:
>> Patches here add 'time=<N>ms' in the diagnostic data of the TAP output,
>> e.g.
>>
>>   ok 1 - pm_netlink: defaults addr list # time=9ms
> 
> Looking closer, this:
> 
> # ok 3 - mptcp[...] MPTCP # time=7184ms
> # ok 4 - mptcp[...] TCP   # time=6458ms
> 
> Makes NIPA unhappy. The match results for regexps look like this:
> 
> (None, '4', ' -', 'mptcp[...] MPTCP', ' # ', 'time=6173ms')
> (None, '4', ' -', 'mptcp[...] TC', None, 'P   # time=6173ms')
> 
> IOW the first one is neat, second one gepooped. The regex really wants
> there to be no more than a single space before the #.

Good catch!

> KTAP definition
> doesn't say that description must not have trailing white space.

Indeed. Same for TAP 13. (TAP 14 is clearer about that and allows
multiple spaces)

> Best I could come up with is:
> 
> diff --git a/contest/remote/vmksft-p.py b/contest/remote/vmksft-p.py
> index fe9e87abdb5c..a37245bd5b30 100755
> --- a/contest/remote/vmksft-p.py
> +++ b/contest/remote/vmksft-p.py
> @@ -73,7 +73,7 @@ group3 testV skip
>      tests = []
>      nested_tests = False
>  
> -    result_re = re.compile(r"(not )?ok (\d+)( -)? ([^#]*[^ ])( # )?([^ ].*)?$")
> +    result_re = re.compile(r"(not )?ok (\d+)( -)? ([^#]*[^ ])( +# )?([^ ].*)?$")

Looks good to me. While at it, we can add a '+' for the spaces after the
'#':

  ( +# +)

I see you didn't commit the previous modification. I can open a PR if it
helps.

>      time_re = re.compile(r"time=(\d+)ms")
>  
>      for line in full_run.split('\n'):
> 
> Thoughts?

In my v2, I will also strip these trailing whitespaces in the selftests,
they don't need to be there.

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


  parent reply	other threads:[~2024-09-04 16:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-02 11:13 [PATCH net-next 0/3] selftests: mptcp: add time per subtests in TAP output Matthieu Baerts (NGI0)
2024-09-02 11:13 ` [PATCH net-next 1/3] selftests: mptcp: lib: " Matthieu Baerts (NGI0)
2024-09-02 11:13 ` [PATCH net-next 2/3] sefltests: mptcp: connect: remote time " Matthieu Baerts (NGI0)
2024-09-04  0:13   ` Jakub Kicinski
2024-09-02 11:13 ` [PATCH net-next 3/3] selftests: mptcp: reset the last TS before the first test Matthieu Baerts (NGI0)
2024-09-03 23:22 ` [PATCH net-next 0/3] selftests: mptcp: add time per subtests in TAP output Jakub Kicinski
2024-09-03 23:30   ` Jakub Kicinski
2024-09-04 16:15   ` Matthieu Baerts [this message]
2024-09-04 19:40     ` Jakub Kicinski
2024-09-04 20:41       ` 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=559e1458-b593-44c7-92b1-6946c57496c5@kernel.org \
    --to=matttbe@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geliang@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martineau@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /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