selftests: Clean forgotten resources as part of cleanup()
authorAmit Cohen <amcohen@nvidia.com>
Tue, 8 Jun 2021 12:44:09 +0000 (15:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jun 2021 21:39:07 +0000 (14:39 -0700)
commite67dfb8d15deb33c425d0b0ee22f2e5eef54c162
treefd33a910ddff0aeaafad769ec320630f05aaf9c7
parent00190c2b19eb33969befb68bbbc6d00edc11bda5
selftests: Clean forgotten resources as part of cleanup()

Several tests do not set some ports down as part of their cleanup(),
resulting in IPv6 link-local addresses and associated routes not being
deleted.

These leaks were found using a BPF tool that monitors ASIC resources.

Solve this by setting the ports down at the end of the tests.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/drivers/net/mlxsw/devlink_trap_l3_drops.sh
tools/testing/selftests/drivers/net/mlxsw/devlink_trap_l3_exceptions.sh
tools/testing/selftests/drivers/net/mlxsw/qos_dscp_bridge.sh
tools/testing/selftests/net/forwarding/pedit_dsfield.sh
tools/testing/selftests/net/forwarding/pedit_l4port.sh
tools/testing/selftests/net/forwarding/skbedit_priority.sh