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>
This commit is contained in:
parent
00190c2b19
commit
e67dfb8d15
|
@ -109,6 +109,9 @@ router_destroy()
|
|||
__addr_add_del $rp1 del 192.0.2.2/24 2001:db8:1::2/64
|
||||
|
||||
tc qdisc del dev $rp2 clsact
|
||||
|
||||
ip link set dev $rp2 down
|
||||
ip link set dev $rp1 down
|
||||
}
|
||||
|
||||
setup_prepare()
|
||||
|
|
|
@ -111,6 +111,9 @@ router_destroy()
|
|||
__addr_add_del $rp1 del 192.0.2.2/24 2001:db8:1::2/64
|
||||
|
||||
tc qdisc del dev $rp2 clsact
|
||||
|
||||
ip link set dev $rp2 down
|
||||
ip link set dev $rp1 down
|
||||
}
|
||||
|
||||
setup_prepare()
|
||||
|
|
|
@ -93,7 +93,9 @@ switch_destroy()
|
|||
lldptool -T -i $swp1 -V APP -d $(dscp_map 10) >/dev/null
|
||||
lldpad_app_wait_del
|
||||
|
||||
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
|
||||
}
|
||||
|
|
|
@ -75,7 +75,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
|
||||
}
|
||||
|
|
|
@ -71,7 +71,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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue