mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-12-02 20:28:24 -05:00
tests: Optimize p2p_go_move_scm initial wait
There is no need to wait for the initial client timeout in this type of test sequence since that wait can be cleared by connecting and disconnecting a client to the group. This allows the test case to be executed much more quickly and the dependency on --long can be removed. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
262825e896
commit
b98445f6ba
@ -752,11 +752,8 @@ def _test_p2p_go_move_active(dev, apdev):
|
|||||||
finally:
|
finally:
|
||||||
dev[0].global_request("P2P_SET disallow_freq ")
|
dev[0].global_request("P2P_SET disallow_freq ")
|
||||||
|
|
||||||
def test_p2p_go_move_scm(dev, apdev, params):
|
def test_p2p_go_move_scm(dev, apdev):
|
||||||
"""P2P GO move due to SCM operation preference [long]"""
|
"""P2P GO move due to SCM operation preference"""
|
||||||
if not params['long']:
|
|
||||||
raise HwsimSkip("Skip test case with long duration due to --long not specified")
|
|
||||||
|
|
||||||
with HWSimRadio(n_channels=2) as (radio, iface):
|
with HWSimRadio(n_channels=2) as (radio, iface):
|
||||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||||
wpas.interface_add(iface)
|
wpas.interface_add(iface)
|
||||||
@ -783,7 +780,14 @@ def _test_p2p_go_move_scm(dev, apdev):
|
|||||||
raise Exception("Unexpected channel %d MHz" % freq)
|
raise Exception("Unexpected channel %d MHz" % freq)
|
||||||
|
|
||||||
# GO move is not allowed while waiting for initial client connection
|
# GO move is not allowed while waiting for initial client connection
|
||||||
time.sleep(20)
|
connect_cli(dev[0], dev[1], freq=freq)
|
||||||
|
dev[1].remove_group()
|
||||||
|
|
||||||
|
freq = dev[0].get_group_status_field('freq')
|
||||||
|
if int(freq) > 2430:
|
||||||
|
raise Exception("Unexpected freq after initial client: " + freq)
|
||||||
|
|
||||||
|
dev[0].dump_monitor()
|
||||||
dev[0].global_request("P2P_SET disallow_freq ")
|
dev[0].global_request("P2P_SET disallow_freq ")
|
||||||
|
|
||||||
ev = dev[0].wait_group_event(["P2P-REMOVE-AND-REFORM-GROUP",
|
ev = dev[0].wait_group_event(["P2P-REMOVE-AND-REFORM-GROUP",
|
||||||
|
Loading…
Reference in New Issue
Block a user