Hi James,
On 1/27/21 6:28 PM, James Prestwood wrote:
Hi Alvin,
On Wed, 2021-01-27 at 10:05 +0000, Alvin Šipraga wrote:
> 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.
> ---
> autotests/util/hostapd.py | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/autotests/util/hostapd.py b/autotests/util/hostapd.py
> index 019d23ba..8e0b3766 100644
> --- 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)
Good catch on this. Within the last day I fixed a logging/verbose issue
with test-runner which this patch would be affected by. My
fix/workaround is to explicitly tell start_process if there is output
being requested with 'need_out=True'. I've got other ideas in the
works, but for now this is how its got to be done. This should work for
you:
proc = ctx.start_process(cmd, wait=True, need_out=True)
Thanks. I actually fixed the same issue of --log not working with
hostapd_cli, but your solution was more generic so I dropped the patch
when sending. Forgot to modify this accordingly though. Sent a v2 patch now.
Kind regards,
Alvin