Commit a4022a33 authored by Petr Machata's avatar Petr Machata Committed by Paolo Abeni
Browse files

selftests: net: Unify code of busywait() and slowwait()



Bodies of busywait() and slowwait() functions are almost identical. Extract
the common code into a helper, loopy_wait, and convert busywait() and
slowwait() into trivial wrappers.

Moreover, the fact that slowwait() uses seconds for units is really not
intuitive, and the comment does not help much. Instead make the unit part
of the name of the argument to further clarify what units are expected.

Cc: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
Reviewed-by: default avatarBenjamin Poirier <bpoirier@nvidia.com>
Reviewed-by: default avatarHangbin Liu <liuhangbin@gmail.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 62d6d91d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment