Skip to content

Add selftests helper to get N unique ports

Dimitri Daskalakis linux-kselftest linux-next netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2selftests: net: py: Add rand_ports helper methodtools/testing/selftests/drivers/net/hw/lib/py/__init__.py tools/testing/selftests/drivers/net/lib/py/__init__.py tools/testing/selftests/net/lib/py/__init__.py +1 more+29 -90 repliesApplied
2/2selftests: drv-net: rss: Generate unique ports for RSS context teststools/testing/selftests/drivers/net/hw/rss_ctx.py+6 -71 replyApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/2] Add selftests helper to get N unique ports

The rss_ctx.py tests would occasionally flake. I found that the successive calls to rand_port would occasionally return duplicate ports, breaking the tests invariants.

Add a new helper that guarantees generated ports are unique.

Dimitri Daskalakis (2):
selftests: net: py: Add rand_ports helper method
selftests: drv-net: rss: Generate unique ports for RSS context tests

 .../drivers/net/hw/lib/py/__init__.py         |  5 ++--
 .../selftests/drivers/net/hw/rss_ctx.py       | 13 +++++-----
 .../selftests/drivers/net/lib/py/__init__.py  |  4 ++--
 .../testing/selftests/net/lib/py/__init__.py  |  5 ++--
 tools/testing/selftests/net/lib/py/utils.py   | 24 ++++++++++++++++---
 5 files changed, 35 insertions(+), 16 deletions(-)
Signature · 1 line
2.47.3