All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v7 4/8] selftests: mptcp: simult_flows: fix misaligned output
Date: Thu, 29 Feb 2024 13:18:11 +0100	[thread overview]
Message-ID: <f30e91dd-efd9-4359-9fda-417214348e60@kernel.org> (raw)
In-Reply-To: <ZeByMRcqfKz1s43B@t480>

Hi Geliang,

On 29/02/2024 13:01, Geliang Tang wrote:
> Hi Matt,
> 
> On Thu, Feb 29, 2024 at 11:27:29AM +0100, Matthieu Baerts wrote:
>> Hi Geliang,
>>
>> On 29/02/2024 11:07, Geliang Tang wrote:
>>> On Thu, Feb 29, 2024 at 05:51:07PM +0800, Geliang Tang wrote:
>>>> From: Geliang Tang <tanggeliang@kylinos.cn>
>>>>
>>>> The last line in the output of simult_flows.sh misaligns with the other
>>>> lines, and all lines are over maximum 75 chars per line.
>>>>
>>>> This patch aligns them by using the newly added print_title() helper,
>>>> and truncate them within 75 chars per line to allow it to be displayed
>>>> normally in regular terminals without breaking lines.
>>>
>>> This part of commit log needs to be updated:
>>>
>>>     This patch aligns them by reducing the number of spaces before [ OK ] to
>>>     1, and truncate them within 75 chars per line to allow it to be displayed
>>>     normally in regular terminals without breaking lines.
>>>
>>> Thanks,
>>> -Geliang
>>
>> I don't know if the 2nd part of my previous comment was clear:
>>
>>> But also, why not having a wider output instead? Why the 75 chars limit?
> 
> "... to allow it to be displayed normally in regular terminals (80 chars)
> without breaking lines." 2 chars is reserved for "# " added at the beginning
> of each line when running tests in virtme-docker. So I chose 75 chars.

Ah OK, I didn't get that "regular terminals are 80 chars wide". To be
honest, I don't know if this is still true. I mean: I never use a
terminal that is only 80 chars wide, at least 100/120. That's why I was
suggesting to show the full info, instead of trunking it.

>>> I mean: yes, the test names should not be too long. But here, probably
>>> too late to change, only modify (increase) the value in print_title(), no?
> 
> I thinks it's not too late, it's the right time to change this, since
> printing title with test counter increases 3 chars for each line,
> becoming much longer. It makes sense to reduce it this time.

But are we not loosing info? e.g. the last one is already:

  "unbalanced bwidth with opposed, unbalanced delay - rev"

If you remove the last 3 chars for the counter, we don't know the
difference with the previous test.

>> Why having this limit of 75 char? In other words, why not printing a
>> larger title, e.g. 90 chars or more if needed?
>>
>>   print_title() {
>>       printf "%-90s" "${1}"
>>   }
> 
> And the lines is too long already, so it makes sense to reduce it, not
> increase it, right?
> 
> I thinks another option is too keep the length unchanged, not reducing
> it, nor increasing it too.

Yes, maybe better, not to "lose" bits. So increasing the title to be
able to align on the last one, and reducing the "${maxtime}" to save a
bit of space?

About the "maxtime", be careful that "selftests: mptcp: simult flows:
re-adapt BW" patch is "blocked" for the moment. So in net and net-next,
we have something like:

  7384 max 7906
  11345 max 11921

(that's 2 more chars than the current version in our tree)

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

  reply	other threads:[~2024-02-29 12:18 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29  9:51 [PATCH mptcp-next v7 0/8] add helpers and vars in mptcp_lib.sh, part 3 Geliang Tang
2024-02-29  9:51 ` [PATCH mptcp-net v7 1/8] selftests: mptcp: diag: return KSFT_FAIL not test_cnt Geliang Tang
2024-02-29 10:51   ` Matthieu Baerts
2024-02-29  9:51 ` [PATCH mptcp-next v7 2/8] selftests: mptcp: connect: add dedicated port counter Geliang Tang
2024-02-29 11:23   ` Matthieu Baerts
2024-02-29 12:18     ` Geliang Tang
2024-02-29 12:22       ` Matthieu Baerts
2024-03-01  7:01         ` Geliang Tang
2024-02-29  9:51 ` [PATCH mptcp-next v7 3/8] selftests: mptcp: connect: fix misaligned output Geliang Tang
2024-02-29  9:51 ` [PATCH mptcp-next v7 4/8] selftests: mptcp: simult_flows: " Geliang Tang
2024-02-29 10:07   ` Geliang Tang
2024-02-29 10:27     ` Matthieu Baerts
2024-02-29 12:01       ` Geliang Tang
2024-02-29 12:18         ` Matthieu Baerts [this message]
2024-02-29 14:35           ` Matthieu Baerts
2024-02-29  9:51 ` [PATCH mptcp-next v7 5/8] selftests: mptcp: sockopt: unify ipv4/ipv6 as v4/v6 Geliang Tang
2024-02-29 11:31   ` Matthieu Baerts
2024-02-29 12:08     ` Geliang Tang
2024-02-29 12:20       ` Matthieu Baerts
2024-02-29  9:51 ` [PATCH mptcp-next v7 6/8] selftests: mptcp: add test counter helpers Geliang Tang
2024-02-29 11:58   ` Matthieu Baerts
2024-02-29 12:03     ` Matthieu Baerts
2024-02-29 12:28     ` Matthieu Baerts
2024-03-01  7:03       ` Geliang Tang
2024-02-29  9:51 ` [PATCH mptcp-next v7 7/8] selftests: mptcp: print test results with counters Geliang Tang
2024-02-29 12:44   ` Matthieu Baerts
2024-02-29  9:51 ` [PATCH mptcp-next v7 8/8] selftests: mptcp: print test results with colors Geliang Tang
2024-02-29 10:43   ` selftests: mptcp: print test results with colors: Tests Results MPTCP CI
2024-02-29 13:04   ` [PATCH mptcp-next v7 8/8] selftests: mptcp: print test results with colors Matthieu Baerts
2024-03-01  7:16     ` Geliang Tang
2024-03-04 11:12       ` 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=f30e91dd-efd9-4359-9fda-417214348e60@kernel.org \
    --to=matttbe@kernel.org \
    --cc=geliang@kernel.org \
    --cc=mptcp@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.