eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 73b89555fa28f333e533913a2f6be8a57bd02cad
parent d8abc88e4c4c62928c620d1a40808c4a20b06732
Author: James Prestwood <prestwoj@gmail.com>
Date:   Thu, 25 Feb 2021 14:01:03 -0800

test-runner: fix Namespace class ref problems

The Namespace class was never being removed when tests finished.
This is fixed by unreffing the hwsim internal _radio object which
both cleans up the radio and allows the Namespace to be removed.

Diffstat:
Mtools/test-runner | 13+++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/tools/test-runner b/tools/test-runner @@ -565,11 +565,9 @@ class Hostapd: dbus_count = 0 class Namespace: - dbus_address = None - processes = [] - radios = [] - def __init__(self, args, name, radios): + self.dbus_address = None + self.processes = [] self.name = name self.radios = radios self.args = args @@ -581,9 +579,13 @@ class Namespace: self.start_dbus() def reset(self): - self.radios = [] self._bus = None + for r in self.radios: + r._radio = None + + self.radios = [] + if self.name == "root": self._bus = dbus.bus.BusConnection(address_or_type=self.dbus_address) @@ -595,7 +597,6 @@ class Namespace: def __del__(self): print("Removing namespace %s" % self.name) - self.reset() Process(['ip', 'netns', 'del', self.name], wait=True)