selftests: rtnetlink: Make the set of tests to run configurable
authorPetr Machata <petrm@nvidia.com>
Tue, 21 Mar 2023 11:52:00 +0000 (12:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Mar 2023 08:32:52 +0000 (08:32 +0000)
commitecb3c1e675c719885ac05bb5473fa5c495d1ad24
tree9c93658ef76001a40bb37875ff56ce02ebdb3056
parent5c4a9aa856c706def9239d1e43c4ea9fccb5c75a
selftests: rtnetlink: Make the set of tests to run configurable

Extract the list of all tests into a variable, ALL_TESTS. Then assume the
environment variable TESTS holds the list of tests to actually run, falling
back to ALL_TESTS if TESTS is empty. This is the same interface that
forwarding selftests use to make the set of tests to run configurable.
In addition to this, allow setting the value explicitly through a command
line option "-t" along the lines of what fib_nexthops.sh does.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/rtnetlink.sh