• Petr Machata's avatar
    selftests: libs: Expand "$@" where possible · d5fbb2eb
    Petr Machata authored
    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: default avatarPetr Machata <petrm@nvidia.com>
    Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d5fbb2eb
lib.sh 43.9 KB