From 1002684e114d8e519cb5f57dce0d61de53f33e60 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 27 Nov 2015 19:11:27 +0200 Subject: [PATCH] tests: Convert p2p_go_move_active to use 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. Signed-off-by: Jouni Malinen --- tests/hwsim/test_p2p_channel.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/hwsim/test_p2p_channel.py b/tests/hwsim/test_p2p_channel.py index 074d9da7c..e17e625de 100644 --- a/tests/hwsim/test_p2p_channel.py +++ b/tests/hwsim/test_p2p_channel.py @@ -711,12 +711,20 @@ def test_p2p_go_move_reg_change(dev, apdev, params): def test_p2p_go_move_active(dev, apdev, params): """P2P GO stays in freq although SCM is possible [long]""" - if dev[0].get_mcc() <= 1: - raise HwsimSkip("Skip due to MCC not being enabled") - 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): + wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5') + wpas.interface_add(iface) + + if wpas.get_mcc() < 2: + raise Exception("New radio does not support MCC") + + ndev = [ wpas, dev[1] ] + _test_p2p_go_move_active(ndev, apdev) + +def _test_p2p_go_move_active(dev, apdev): dev[0].request("SET p2p_no_group_iface 0") try: dev[0].global_request("P2P_SET disallow_freq 2430-6000")