[PATCH 07/24] tests: Modify test_p2p_discovery to use global and group interfaces

Peer, Ilan ilan.peer
Thu Feb 5 23:20:33 PST 2015


> -----Original Message-----
> From: hostap-bounces at lists.shmoo.com [mailto:hostap-
> bounces at lists.shmoo.com] On Behalf Of Jouni Malinen
> Sent: Thursday, February 05, 2015 13:45
> To: hostap at lists.shmoo.com
> Subject: Re: [PATCH 07/24] tests: Modify test_p2p_discovery to use global
> and group interfaces
> 
> On Wed, Feb 04, 2015 at 04:30:19AM -0500, Ilan Peer wrote:
> > Modify the tests in test_p2p_discovery to use the global control
> > interface and group interface.
> 
> > diff --git a/tests/hwsim/test_p2p_discovery.py
> > b/tests/hwsim/test_p2p_discovery.py
> > @@ -132,19 +132,21 @@ def test_discovery_group_client(dev):
> >      # make group client non-responsive on operating channel
> >      dev[1].dump_monitor()
> >      dev[1].group_request("DISCONNECT")
> > -    dev[1].wait_disconnected(timeout=10)
> > +    ev = dev[1].wait_global_event(["CTRL-EVENT-DISCONNECTED"],
> timeout=10)
> > +    if ev is None:
> > +        raise Exception("Timeout on waiting disconnection")
> 
> That does not look correct. A group_request to disconnect should get a
> group event, not global event, CTRL-EVENT-DISCONNECTED.
>

Fixed.
 
> > @@ -234,8 +236,8 @@ def test_discovery_social_plus_one(dev):
> > -    dev[0].wait_event(["CTRL-EVENT-SCAN-STARTED"])
> > -    dev[0].wait_event(["CTRL-EVENT-SCAN-STARTED"])
> > +    dev[0].wait_global_event(["CTRL-EVENT-SCAN-STARTED"], timeout=1)
> > +    dev[0].wait_global_event(["CTRL-EVENT-SCAN-STARTED"], timeout=1)
> 
> This looks bad, i.e., scan events should not really be global events.
> The scan started events for p2p_find should actually just be removed
> completely.
> 

You mean you would like to see the events removed from the wpa_supplicant code? Would you like to see some other events, i.e., P2P_FIND_STARTED/STOPPED + P2P_SEARCH_STARTED/STOPPED etc.?

Ilan. 



More information about the Hostap mailing list