commit fda4734a1bf76348f8cc888eaa86b0878558bd3a
parent 63c8df78a34e7bbf7c3de46e0c876d6b76fabe34
Author: Alvin Šipraga <ALSI@bang-olufsen.dk>
Date: Thu, 28 Jan 2021 09:26:03 +0000
auto-t: throw exception if hostapd can't send BSS transition req
The testAPRoam autotest was silently failing on my machine until I
realized that my distribution hostapd (Arch Linux) is not built with
CONFIG_WNM_AP=y. Indeed, it is also disabled by default in upstream
hostapd. This resulted in the send_bss_transition() function of
hostapd.py silently failing. With this change, throw an exception in
case the BSS_TM_REQ command does not succeed to hopefully save others
the time of debugging this problem.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/autotests/util/hostapd.py b/autotests/util/hostapd.py
@@ -184,7 +184,10 @@ class HostapdCLI:
(addr, bss_info, op_class, chan_num, phy_num)]
pref += 1
- ctx.start_process(cmd, wait=True)
+ proc = ctx.start_process(cmd, wait=True, need_out=True)
+
+ if 'OK' not in proc.out:
+ raise Exception('BSS_TM_REQ failed, is hostapd built with CONFIG_WNM_AP=y?')
def get_config_value(self, key):
# first find the right config file