[PATCH 04/24] tests: Use Global and Group control interfaces in test_p2p_autogo

Jouni Malinen j
Thu Feb 5 03:39:07 PST 2015


On Wed, Feb 04, 2015 at 04:30:16AM -0500, Ilan Peer wrote:
> 1. In test_autogo_m2d(), in case that group interface
>    is not the same as the main interface, need to use
>    the group interface to listen for WPS-M2D event.
> 2. Similarly, in test_autogo_pbc(), use the global control
>    interface to get the WPS-M2D event.

This sounds quite conflicting..

> diff --git a/tests/hwsim/test_p2p_autogo.py b/tests/hwsim/test_p2p_autogo.py
> @@ -183,10 +183,10 @@ def test_autogo_m2d(dev):
> -    ev = dev[2].wait_global_event(["WPS-M2D"], timeout=10)
> +    ev = dev[2].wait_group_event(["WPS-M2D"], timeout=10)
>      if ev is None:
>          raise Exception("No global M2D event (2)")
> -    ev = dev[2].wait_event(["WPS-M2D"], timeout=10)
> +    ev = dev[2].wait_group_event(["WPS-M2D"], timeout=10)
>      if ev is None:
>          raise Exception("No M2D event on group interface (2)")

Based on those error messages, this was clearly trying to verify that
WPS-M2D event is delivered through two different control interfaces.
Changing that to require that two copies of that event are delivered on
the group event sounds incorrect. Changing the second one to use
wait_group_event sounds fine, but the first one should likely remain as
wait_global_event.

> @@ -235,7 +235,7 @@ def test_autogo_pbc(dev):
>          raise Exception("WPS_PBC failed")
>      dev[2].p2p_connect_group(dev[0].p2p_dev_addr(), "pbc", timeout=0,
>                               social=True)
> -    ev = dev[2].wait_event(["WPS-M2D"], timeout=15)
> +    ev = dev[2].wait_global_event(["WPS-M2D"], timeout=15)
>      if ev is None:
>          raise Exception("WPS-M2D not reported")

I guess this is fine since WPS-M2D gets sent both to the group and
global control interface.
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list