diff options
author | Amit Cohen <amitc@mellanox.com> | 2019-11-07 19:42:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-08 06:51:40 +0300 |
commit | 7ce4e7608674ff4ba78157eea4bea464e4106545 (patch) | |
tree | 692953097f9502437b0ce3c02fc6c767163464dc /tools | |
parent | fd74feeb2452c94f6e381e1fcef00d69b55723b8 (diff) | |
download | linux-7ce4e7608674ff4ba78157eea4bea464e4106545.tar.xz |
selftests: forwarding: devlink: Add functionality for trap exceptions test
Add common part of all the tests - check devlink status to ensure that
packets were trapped.
Signed-off-by: Amit Cohen <amitc@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/net/forwarding/devlink_lib.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/devlink_lib.sh b/tools/testing/selftests/net/forwarding/devlink_lib.sh index cbc38cc61873..40b076983239 100644 --- a/tools/testing/selftests/net/forwarding/devlink_lib.sh +++ b/tools/testing/selftests/net/forwarding/devlink_lib.sh @@ -356,6 +356,18 @@ devlink_trap_group_stats_idle_test() fi } +devlink_trap_exception_test() +{ + local trap_name=$1; shift + local group_name=$1; shift + + devlink_trap_stats_idle_test $trap_name + check_fail $? "Trap stats idle when packets should have been trapped" + + devlink_trap_group_stats_idle_test $group_name + check_fail $? "Trap group idle when packets should have been trapped" +} + devlink_trap_drop_test() { local trap_name=$1; shift |