Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/net: packetdrill: unflake tcp_user_timeout_user-timeout-probe.pkt

This test fails the first time I am running it after a fresh virtme-ng boot.

tcp_user_timeout_user-timeout-probe.pkt:33: runtime error in write call: Expected result -1 but got 24 with errno 2 (No such file or directory)

Tweaks the timings a bit, to reduce flakiness.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Soham Chakradeo <sohamch@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Tested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/20251014171907.3554413-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
56cef47c 01b6aca2

+4 -2
+4 -2
tools/testing/selftests/net/packetdrill/tcp_user_timeout_user-timeout-probe.pkt
··· 23 23 24 24 // install a qdisc dropping all packets 25 25 +0 `tc qdisc delete dev tun0 root 2>/dev/null ; tc qdisc add dev tun0 root pfifo limit 0` 26 + 26 27 +0 write(4, ..., 24) = 24 27 28 // When qdisc is congested we retry every 500ms 28 29 // (TCP_RESOURCE_PROBE_INTERVAL) and therefore 29 30 // we retry 6 times before hitting 3s timeout. 30 31 // First verify that the connection is alive: 31 - +3.250 write(4, ..., 24) = 24 32 + +3 write(4, ..., 24) = 24 33 + 32 34 // Now verify that shortly after that the socket is dead: 33 - +.100 write(4, ..., 24) = -1 ETIMEDOUT (Connection timed out) 35 + +1 write(4, ..., 24) = -1 ETIMEDOUT (Connection timed out) 34 36 35 37 +0 %{ assert tcpi_probes == 6, tcpi_probes; \ 36 38 assert tcpi_backoff == 0, tcpi_backoff }%