tests: Use dynamic radio for P2P_DEVICE tests
Use dynamic radios for P2P_DEVICE tests to be able to test support when the default in hwsim is to not support it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
9b2c227216
commit
5a8d165cd8
1 changed files with 31 additions and 27 deletions
|
@ -12,11 +12,13 @@ from wpasupplicant import WpaSupplicant
|
||||||
from test_p2p_grpform import go_neg_pin_authorized
|
from test_p2p_grpform import go_neg_pin_authorized
|
||||||
from test_p2p_grpform import check_grpform_results
|
from test_p2p_grpform import check_grpform_results
|
||||||
from test_p2p_grpform import remove_group
|
from test_p2p_grpform import remove_group
|
||||||
|
from hwsim import HWSimRadio
|
||||||
|
|
||||||
def test_p2p_device_grpform(dev, apdev):
|
def test_p2p_device_grpform(dev, apdev):
|
||||||
"""P2P group formation with driver using cfg80211 P2P Device"""
|
"""P2P group formation with driver using cfg80211 P2P Device"""
|
||||||
|
with HWSimRadio(use_p2p_device=True) as (radio, iface):
|
||||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||||
wpas.interface_add("wlan5")
|
wpas.interface_add(iface)
|
||||||
[i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15,
|
[i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15,
|
||||||
r_dev=wpas, r_intent=0)
|
r_dev=wpas, r_intent=0)
|
||||||
check_grpform_results(i_res, r_res)
|
check_grpform_results(i_res, r_res)
|
||||||
|
@ -24,8 +26,9 @@ def test_p2p_device_grpform(dev, apdev):
|
||||||
|
|
||||||
def test_p2p_device_grpform2(dev, apdev):
|
def test_p2p_device_grpform2(dev, apdev):
|
||||||
"""P2P group formation with driver using cfg80211 P2P Device (reverse)"""
|
"""P2P group formation with driver using cfg80211 P2P Device (reverse)"""
|
||||||
|
with HWSimRadio(use_p2p_device=True) as (radio, iface):
|
||||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||||
wpas.interface_add("wlan5")
|
wpas.interface_add(iface)
|
||||||
[i_res, r_res] = go_neg_pin_authorized(i_dev=wpas, i_intent=15,
|
[i_res, r_res] = go_neg_pin_authorized(i_dev=wpas, i_intent=15,
|
||||||
r_dev=dev[0], r_intent=0)
|
r_dev=dev[0], r_intent=0)
|
||||||
check_grpform_results(i_res, r_res)
|
check_grpform_results(i_res, r_res)
|
||||||
|
@ -33,8 +36,9 @@ def test_p2p_device_grpform2(dev, apdev):
|
||||||
|
|
||||||
def test_p2p_device_group_remove(dev, apdev):
|
def test_p2p_device_group_remove(dev, apdev):
|
||||||
"""P2P group removal via the P2P ctrl interface with driver using cfg80211 P2P Device"""
|
"""P2P group removal via the P2P ctrl interface with driver using cfg80211 P2P Device"""
|
||||||
|
with HWSimRadio(use_p2p_device=True) as (radio, iface):
|
||||||
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
|
||||||
wpas.interface_add("wlan5")
|
wpas.interface_add(iface)
|
||||||
[i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15,
|
[i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15,
|
||||||
r_dev=wpas, r_intent=0)
|
r_dev=wpas, r_intent=0)
|
||||||
check_grpform_results(i_res, r_res)
|
check_grpform_results(i_res, r_res)
|
||||||
|
|
Loading…
Reference in a new issue