All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: MPTCP Linux <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-net] selftests: mptcp: drop nanoseconds width specifier
Date: Fri, 15 May 2026 05:59:49 +0200	[thread overview]
Message-ID: <822ad467-2d97-4c2f-8e5b-78be0bd0acf2@kernel.org> (raw)
In-Reply-To: <20260515-mptcp-sft-uutils-0-8-0-v1-1-4801c8e16485@kernel.org>

Hello,

On 15/05/2026 04:11, Matthieu Baerts (NGI0) wrote:
> Using the format specifier +%s%3N with GNU date is honoured, and only
> prints 3 digits of the nanoseconds portion of the seconds since epoch,
> which corresponds to the milliseconds.
> 
> The uutils implementation of date currently does not honour this, and
> always prints all 9 digits. This is a known issue [1], but can be worked
> around by adapting this test to use nanoseconds instead of microseconds,
> and then divide it by 1e6.
> 
> This fix is similar to what has been done on systemd side [2].

I suggest applying this patch, and sending to netdev-net, not to block
those using uutils, e.g. on Ubuntu 26.04.

I will apply a small change, see below.

(...)

> diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
> index 989a5975dcea..9d3efbfb3015 100644
> --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
> @@ -236,7 +236,7 @@ mptcp_lib_kversion_ge() {
>  }
>  
>  mptcp_lib_subtests_last_ts_reset() {
> -	MPTCP_LIB_SUBTESTS_LAST_TS_MS="$(date +%s%3N)"
> +	MPTCP_LIB_SUBTESTS_LAST_TS_MS="$(date +%s%N)"

The suffix should then be _NS instead of _MS.

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


  parent reply	other threads:[~2026-05-15  3:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15  2:11 [PATCH mptcp-net] selftests: mptcp: drop nanoseconds width specifier Matthieu Baerts (NGI0)
2026-05-15  3:19 ` MPTCP CI
2026-05-15  3:59 ` Matthieu Baerts [this message]
2026-05-15  4:15   ` 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=822ad467-2d97-4c2f-8e5b-78be0bd0acf2@kernel.org \
    --to=matttbe@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.