Skip to content

selftests: Use busywait() in a couple places

Petr Machata netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4selftests: forwarding: lib: Add tc_rule_handle_stats_get()tools/testing/selftests/net/forwarding/lib.sh+11 -00 replies
2/4selftests: forwarding: Convert until_counter_is() to take expressiontools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh tools/testing/selftests/net/forwarding/lib.sh+6 -60 replies
3/4selftests: forwarding: tc_common: Convert to use busywaittools/testing/selftests/net/forwarding/tc_common.sh+4 -280 replies
4/4selftests: mlxsw: qos_defprio: Use until_counter_istools/testing/selftests/drivers/net/mlxsw/qos_defprio.sh+4 -140 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchAmit Cohen
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/4] selftests: Use busywait() in a couple places

From: Petr Machata <[email protected]>

Two helper function for active waiting for an event were recently
introduced: busywait() as the active-waiting tool, and until_counter_is() as a configurable predicate that can be plugged into busywait(). Use these in tc_common and mlxsw's qos_defprio instead of hand-coding equivalents.

Patches #1 and #2 extend lib.sh facilities to make the transition possible. Patch #3 converts tc_common, and patch #4 qos_defprio.

Petr Machata (4):
selftests: forwarding: lib: Add tc_rule_handle_stats_get()
selftests: forwarding: Convert until_counter_is() to take expression
selftests: forwarding: tc_common: Convert to use busywait
selftests: mlxsw: qos_defprio: Use until_counter_is

 .../drivers/net/mlxsw/qos_defprio.sh          | 18 +++--------
 .../drivers/net/mlxsw/sch_red_core.sh         |  6 ++--
 tools/testing/selftests/net/forwarding/lib.sh | 17 ++++++++--
 .../selftests/net/forwarding/tc_common.sh     | 32 +++----------------
 4 files changed, 25 insertions(+), 48 deletions(-)
Signature · 1 line
2.20.1