mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 23:07:54 +07:00
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>
This commit is contained in:
parent
fd74feeb24
commit
7ce4e76086
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user