From 709c86086f236e3859909680b122c879f9638a67 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 22 Apr 2021 10:37:40 -0700 Subject: [PATCH] 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. --- tools/test-runner | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test-runner b/tools/test-runner index fce3eed4..bbb25925 100755 --- a/tools/test-runner +++ b/tools/test-runner @@ -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()