]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: mptcp: drop nanoseconds width specifier
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Fri, 15 May 2026 04:27:37 +0000 (06:27 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 19 May 2026 13:36:35 +0000 (15:36 +0200)
commit01ff78e4b3d98689184c52d97f9575dfbdc3b10f
treeb1581c05ffe1d9eba60eea71c404ee8cf11b612c
parent3a543ae0e2092d5c2085d5f21f7a7dbafdffea3c
selftests: mptcp: drop nanoseconds width specifier

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], and it is
needed to run the selftests on Ubuntu 26.04, containing uutils 0.8.0.

Note that the Fixes tag is there even if this patch doesn't fix an issue
in the kernel selftests, but it is useful for those using uutils 0.8.0.

Fixes: 048d19d444be ("mptcp: add basic kselftest for mptcp")
Cc: stable@vger.kernel.org
Link: https://github.com/uutils/coreutils/issues/11658
Link: https://github.com/systemd/systemd/pull/41627
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260515-net-mptcp-misc-fixes-7-1-rc4-v2-6-701e96419f2f@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/mptcp/mptcp_connect.sh
tools/testing/selftests/net/mptcp/mptcp_lib.sh