Skip to content
Commit 68e73221 authored by Kal Conley's avatar Kal Conley Committed by Martin KaFai Lau
Browse files

selftests: xsk: Deflakify STATS_RX_DROPPED test



Fix flaky STATS_RX_DROPPED test. The receiver calls getsockopt after
receiving the last (valid) packet which is not the final packet sent in
the test (valid and invalid packets are sent in alternating fashion with
the final packet being invalid). Since the last packet may or may not
have been dropped already, both outcomes must be allowed.

This issue could also be fixed by making sure the last packet sent is
valid. This alternative is left as an exercise to the reader (or the
benevolent maintainers of this file).

This problem was quite visible on certain setups. On one machine this
failure was observed 50% of the time.

Also, remove a redundant assignment of pkt_stream->nb_pkts. This field
is already initialized by __pkt_stream_alloc.

Fixes: 27e934be ("selftests: xsk: make stat tests not spin on getsockopt")
Signed-off-by: default avatarKal Conley <kal.conley@dectris.com>
Acked-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/r/20230403120400.31018-1-kal.conley@dectris.com


Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
parent f2b50f17
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment