tests: Convert p2p_go_move_scm_peer_does_not_support to dynamic hwsim
Use a dynamically added HWSimRadio to allow the MCC case to be covered with a single test run with the mac80211_hwsim default radios disabling MCC. In addition, remove dependency on --long since this test case does not really take that long. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
f0b39e057a
commit
d18df681b0
1 changed files with 11 additions and 6 deletions
|
@ -850,14 +850,19 @@ def _test_p2p_go_move_scm_peer_supports(dev, apdev):
|
||||||
dev[0].global_request("SET p2p_go_freq_change_policy 2")
|
dev[0].global_request("SET p2p_go_freq_change_policy 2")
|
||||||
set_country("00")
|
set_country("00")
|
||||||
|
|
||||||
def test_p2p_go_move_scm_peer_does_not_support(dev, apdev, params):
|
def test_p2p_go_move_scm_peer_does_not_support(dev, apdev):
|
||||||
"""No P2P GO move due to SCM operation (peer does not supports) [long]"""
|
"""No P2P GO move due to SCM operation (peer does not supports)"""
|
||||||
if dev[0].get_mcc() <= 1:
|
with HWSimRadio(n_channels=2) as (radio, iface):
|
||||||
raise HwsimSkip("Skip due to MCC not being enabled")
|
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||||
|
wpas.interface_add(iface)
|
||||||
|
|
||||||
if not params['long']:
|
if wpas.get_mcc() < 2:
|
||||||
raise HwsimSkip("Skip test case with long duration due to --long not specified")
|
raise Exception("New radio does not support MCC")
|
||||||
|
|
||||||
|
ndev = [ wpas, dev[1] ]
|
||||||
|
_test_p2p_go_move_scm_peer_does_not_support(ndev, apdev)
|
||||||
|
|
||||||
|
def _test_p2p_go_move_scm_peer_does_not_support(dev, apdev):
|
||||||
try:
|
try:
|
||||||
dev[0].global_request("SET p2p_go_freq_change_policy 1")
|
dev[0].global_request("SET p2p_go_freq_change_policy 1")
|
||||||
set_country("US", dev[0])
|
set_country("US", dev[0])
|
||||||
|
|
Loading…
Reference in a new issue