]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: forwarding: lib: Add check_err_fail()
authorPetr Machata <petrm@mellanox.com>
Sat, 30 Jun 2018 00:45:47 +0000 (02:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 13:06:15 +0000 (22:06 +0900)
commitd2242e7175f40c6285a8fa1aed8e2a97a64d7e46
tree41f672c201ab868de0bc5b8d6e76db0f9914140f
parent5094a96b13cdc1cd022070d6d19883b5b81a3947
selftests: forwarding: lib: Add check_err_fail()

In the scale testing scenarios, one usually has a condition that is
expected to either fail, or pass, depending on which side of the scale
is being tested.

To capture this logic, add a function check_err_fail(), which dispatches
either to check_err() or check_fail(), depending on the value of the
first argument, should_fail.

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