From: Jouni Malinen Date: Fri, 27 Nov 2015 17:01:10 +0000 (+0200) Subject: tests: Dynamic hwsim p2ps_channel_active_go_and_station_different_mcc X-Git-Tag: hostap_2_6~1319 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78fdab307e4f10275795a196489a4894b0b437d3;p=thirdparty%2Fhostap.git tests: Dynamic hwsim p2ps_channel_active_go_and_station_different_mcc Convert p2ps_channel_active_go_and_station_different_mcc to 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 --- diff --git a/tests/hwsim/test_p2ps.py b/tests/hwsim/test_p2ps.py index 26bdd51ff..33a0b98ed 100644 --- a/tests/hwsim/test_p2ps.py +++ b/tests/hwsim/test_p2ps.py @@ -1435,9 +1435,17 @@ def test_p2ps_channel_active_go_and_station_different(dev, apdev): def test_p2ps_channel_active_go_and_station_different_mcc(dev, apdev): """P2PS connection, active P2P GO and station on channel""" - if dev[0].get_mcc() == 1: - raise HwsimSkip('Skip due to MCC not being enabled') + 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_p2ps_channel_active_go_and_station_different_mcc(ndev, apdev) +def _test_p2ps_channel_active_go_and_station_different_mcc(dev, apdev): set_no_group_iface(dev[0], 0) set_no_group_iface(dev[1], 0)