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.
This commit is contained in:
Alvin Šipraga 2021-01-28 09:26:03 +00:00 committed by Denis Kenzior
parent 63c8df78a3
commit fda4734a1b
1 changed files with 4 additions and 1 deletions

View File

@ -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