]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests: tls: make the new data_steal test less flaky
authorJakub Kicinski <kuba@kernel.org>
Thu, 14 Aug 2025 19:43:23 +0000 (12:43 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 16 Aug 2025 01:07:27 +0000 (18:07 -0700)
commit715c7a36d59f54162a26fac1d1ed8dc087a24cf1
treea9825109053fd6248b60e12e7cbc043c1b477812
parent12da2b92ad50e6602b4c5e9073d71f2368b70b63
selftests: tls: make the new data_steal test less flaky

The CI has hit a couple of cases of:

  RUN           global.data_steal ...
 tls.c:2762:data_steal:Expected recv(cfd, buf2, sizeof(buf2), MSG_DONTWAIT) (20000) == -1 (-1)
 data_steal: Test terminated by timeout
          FAIL  global.data_steal

Looks like the 2msec sleep is not long enough. Make the sleep longer,
and then instead of second sleep wait for the thieving process to exit.
That way we can be sure it called recv() before us.

While at it also avoid trying to steal more than a record, this seems
to be causing issues in manual testing as well.

Fixes: d7e82594a45c ("selftests: tls: test TCP stealing data from under the TLS socket")
Link: https://patch.msgid.link/20250814194323.2014650-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/tls.c