selftests/net/forwarding: add slowwait functions
authorHangbin Liu <liuhangbin@gmail.com>
Mon, 5 Feb 2024 13:00:45 +0000 (21:00 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Feb 2024 02:26:20 +0000 (18:26 -0800)
commitc8f4b19d64b93091ca30fe6800f41d1532bd7507
treef50d1bb1842774aed08e108f041db2a78c27d425
parentb27696cd8fcc0ace1b2dfd81b7bff824a30b1fd1
selftests/net/forwarding: add slowwait functions

Add slowwait functions to wait for some operations that may need a long time
to finish. The busywait executes the cmd too fast, which is kind of wasting
cpu in this scenario. At the same time, if shell debugging is enabled with
`set -x`. the busywait will output too much logs.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20240205130048.282087-2-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/lib.sh