Re: [PATCH net-next 0/3] selftests: mptcp: add time per subtests in TAP output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux