selftests: libs: Expand "$@" where possible
authorPetr Machata <petrm@nvidia.com>
Thu, 27 Jun 2024 14:48:38 +0000 (16:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2024 09:55:36 +0000 (10:55 +0100)
commitd5fbb2eb33c287450dadd6e2b5f6b698f0243a14
tree4b2295cdb3b5d034c8d4a4b62b77731b16e32236
parentc977ac49feada8dc938cfd77d333699e81b29154
selftests: libs: Expand "$@" where possible

In some functions, argument-forwarding through "$@" without listing the
individual arguments explicitly is fundamental to the operation of a
function. E.g. xfail_on_veth() should be able to run various tests in the
fail-to-xfail regime, and usage of "$@" is appropriate as an abstraction
mechanism. For functions such as simple_if_init(), $@ is a handy way to
pass an array.

In other functions, it's merely a mechanism to save some typing, which
however ends up obscuring the real arguments and makes life hard for those
that end up reading the code.

This patch adds some of the implicit function arguments and correspondingly
expands $@'s. In several cases this will come in handy as following patches
adjust the parameter lists.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/lib.sh
tools/testing/selftests/net/forwarding/mirror_gre_flower.sh
tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
tools/testing/selftests/net/forwarding/mirror_lib.sh