eiwd

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

commit 11f0abebe678a5be59192ce1a034619ac59ff7e1
parent bf9d2b6c52c31700d32767d1f35d73c8686cff77
Author: James Prestwood <prestwoj@gmail.com>
Date:   Thu, 25 Feb 2021 14:00:59 -0800

test-runner: add better Hostapd cleanup

There were a few issues with the cleanup of Hostapd. First the
process was only being killed, which did not actually remove
the process from the list.

In addition, with EAP-SIM/AKA tests, hostapd created sim_db
unix socket files which it does not clean up.

Diffstat:
Mtools/test-runner | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/tools/test-runner b/tools/test-runner @@ -449,6 +449,8 @@ class Hostapd: process since hostapd can be started with multiple config files. ''' def __init__(self, ctx, radios, configs, radius): + self.ctx = ctx + if len(configs) != len(radios): raise Exception("Config (%d) and radio (%d) list length not equal" % \ (len(configs), len(radios))) @@ -531,7 +533,17 @@ class Hostapd: dbg("Failed to remove %s" % self.global_ctrl_iface) self.instances = None - self.process.kill() + + # Hostapd may have already been stopped + if self.process: + self.ctx.stop_process(self.process) + + self.ctx = None + + # Hostapd creates simdb sockets for EAP-SIM/AKA tests but does not + # clean them up. + for f in glob("/tmp/eap_sim_db*"): + os.remove(f) dbus_count = 0