Commit 7ce4e760 authored by Amit Cohen's avatar Amit Cohen Committed by David S. Miller

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: default avatarAmit Cohen <amitc@mellanox.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd74feeb
...@@ -356,6 +356,18 @@ devlink_trap_group_stats_idle_test() ...@@ -356,6 +356,18 @@ devlink_trap_group_stats_idle_test()
fi 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() devlink_trap_drop_test()
{ {
local trap_name=$1; shift local trap_name=$1; shift
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment