All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] auto-t: throw exception if hostapd can't send BSS transition req
@ 2021-01-28  9:26 Alvin =?unknown-8bit?q?=C5=A0ipraga?=
  2021-01-28 19:31 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Alvin =?unknown-8bit?q?=C5=A0ipraga?= @ 2021-01-28  9:26 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]

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..277a07b0 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, 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
-- 
2.29.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] auto-t: throw exception if hostapd can't send BSS transition req
  2021-01-28  9:26 [PATCH v2] auto-t: throw exception if hostapd can't send BSS transition req Alvin =?unknown-8bit?q?=C5=A0ipraga?=
@ 2021-01-28 19:31 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2021-01-28 19:31 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 664 bytes --]

Hi Alvin,

On 1/28/21 3:26 AM, 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(-)
> 

Applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-28 19:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28  9:26 [PATCH v2] auto-t: throw exception if hostapd can't send BSS transition req Alvin =?unknown-8bit?q?=C5=A0ipraga?=
2021-01-28 19:31 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.