3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 04:32:37 +01:00

test-runner: fix process cleanup loop

The processes in the list ultimately get removed for each
kill() call. This causes strange behavior since the list is
being iterated and each iteration is removing items. Instead
iterate over a new temporary list so the actual process list
can be cleaned up.
This commit is contained in:
James Prestwood 2021-04-22 10:37:40 -07:00 committed by Denis Kenzior
parent d4e27b8ee2
commit 709c86086f

View File

@ -599,7 +599,7 @@ class Namespace:
if self.name == "root":
self._bus = dbus.bus.BusConnection(address_or_type=self.dbus_address)
for p in self.processes:
for p in list(self.processes):
print("Killing process %s" % p.name)
p.kill()