tests: Fix wifi_display_persistent_group with P2P Device
Use the global control interface to list the P2P Device persistent networks. Get and parse the P2P-GROUP-STARTED events, so later the interface names would be available for the connectivity test etc. Both of these are required when a dedicated P2P Device interface is used. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
de7b02fd18
commit
063006328a
1 changed files with 8 additions and 1 deletions
|
@ -267,13 +267,18 @@ def test_wifi_display_persistent_group(dev):
|
||||||
|
|
||||||
dev[0].dump_monitor()
|
dev[0].dump_monitor()
|
||||||
dev[1].dump_monitor()
|
dev[1].dump_monitor()
|
||||||
networks = dev[0].list_networks()
|
networks = dev[0].list_networks(p2p=True)
|
||||||
if len(networks) != 1:
|
if len(networks) != 1:
|
||||||
raise Exception("Unexpected number of networks")
|
raise Exception("Unexpected number of networks")
|
||||||
if "[P2P-PERSISTENT]" not in networks[0]['flags']:
|
if "[P2P-PERSISTENT]" not in networks[0]['flags']:
|
||||||
raise Exception("Not the persistent group data")
|
raise Exception("Not the persistent group data")
|
||||||
if "OK" not in dev[0].global_request("P2P_GROUP_ADD persistent=" + networks[0]['id'] + " freq=" + listen_freq):
|
if "OK" not in dev[0].global_request("P2P_GROUP_ADD persistent=" + networks[0]['id'] + " freq=" + listen_freq):
|
||||||
raise Exception("Could not start GO")
|
raise Exception("Could not start GO")
|
||||||
|
ev = dev[0].wait_global_event(["P2P-GROUP-STARTED"], timeout=2)
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("GO start up timed out")
|
||||||
|
dev[0].group_form_result(ev)
|
||||||
|
|
||||||
connect_cli(dev[0], dev[2], social=True, freq=listen_freq)
|
connect_cli(dev[0], dev[2], social=True, freq=listen_freq)
|
||||||
dev[0].dump_monitor()
|
dev[0].dump_monitor()
|
||||||
dev[1].dump_monitor()
|
dev[1].dump_monitor()
|
||||||
|
@ -281,6 +286,8 @@ def test_wifi_display_persistent_group(dev):
|
||||||
ev = dev[1].wait_global_event(["P2P-GROUP-STARTED"], timeout=30)
|
ev = dev[1].wait_global_event(["P2P-GROUP-STARTED"], timeout=30)
|
||||||
if ev is None:
|
if ev is None:
|
||||||
raise Exception("Timeout on group re-invocation (on client)")
|
raise Exception("Timeout on group re-invocation (on client)")
|
||||||
|
dev[1].group_form_result(ev)
|
||||||
|
|
||||||
ev = dev[0].wait_global_event(["P2P-GROUP-STARTED"], timeout=0.1)
|
ev = dev[0].wait_global_event(["P2P-GROUP-STARTED"], timeout=0.1)
|
||||||
if ev is not None:
|
if ev is not None:
|
||||||
raise Exception("Unexpected P2P-GROUP-START on GO")
|
raise Exception("Unexpected P2P-GROUP-START on GO")
|
||||||
|
|
Loading…
Reference in a new issue