[PATCH 07/24] tests: Modify test_p2p_discovery to use global and group interfaces
Jouni Malinen
j
Thu Feb 5 03:45:13 PST 2015
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.
> @@ -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.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list