]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: forwarding: lib: Add require_command()
authorPetr Machata <petrm@mellanox.com>
Mon, 30 Jul 2018 14:39:46 +0000 (16:39 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Jul 2018 16:47:21 +0000 (09:47 -0700)
commitda930b0767b1f8d7ba65fa02a6b5fdb3b1513e32
treeecce00074068a93f416eab112e8b84e4a2c0975a
parent172815e54d8b49c722202518b909a4fb4b46b046
selftests: forwarding: lib: Add require_command()

The logic for testing whether a certain command is available is used
several times in the current code base. The tests in follow-up patches
add more requirements like that.

Therefore extract the logic into a named function, require_command(),
that can be used directly from lib.sh as well as from any test that
wishes to declare dependence on some command.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/lib.sh