aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/forwarding/skbedit_priority.sh
diff options
context:
space:
mode:
authorAmit Cohen <amcohen@nvidia.com>2021-06-08 15:44:09 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-08 14:39:07 -0700
commite67dfb8d15deb33c425d0b0ee22f2e5eef54c162 (patch)
treefd33a910ddff0aeaafad769ec320630f05aaf9c7 /tools/testing/selftests/net/forwarding/skbedit_priority.sh
parentselftests: router_scale: Do not count failed routes (diff)
downloadlinux-dev-e67dfb8d15deb33c425d0b0ee22f2e5eef54c162.tar.xz
linux-dev-e67dfb8d15deb33c425d0b0ee22f2e5eef54c162.zip
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>
Diffstat (limited to '')
-rwxr-xr-xtools/testing/selftests/net/forwarding/skbedit_priority.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/skbedit_priority.sh b/tools/testing/selftests/net/forwarding/skbedit_priority.sh
index e3bd8a6bb8b4..bde11dc27873 100755
--- a/tools/testing/selftests/net/forwarding/skbedit_priority.sh
+++ b/tools/testing/selftests/net/forwarding/skbedit_priority.sh
@@ -72,7 +72,9 @@ switch_destroy()
tc qdisc del dev $swp2 clsact
tc qdisc del dev $swp1 clsact
+ ip link set dev $swp2 down
ip link set dev $swp2 nomaster
+ ip link set dev $swp1 down
ip link set dev $swp1 nomaster
ip link del dev br1
}