tests: Use hapd from hostapd.add_bss()
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
This commit is contained in:
parent
6f334bf7a0
commit
5148b392ab
2 changed files with 4 additions and 9 deletions
|
@ -317,9 +317,8 @@ def test_ap_enable_disable_reenable(dev, apdev):
|
||||||
|
|
||||||
def test_ap_double_disable(dev, apdev):
|
def test_ap_double_disable(dev, apdev):
|
||||||
"""Double DISABLE regression test"""
|
"""Double DISABLE regression test"""
|
||||||
hostapd.add_bss(apdev[0], apdev[0]['ifname'], 'bss-1.conf')
|
hapd = hostapd.add_bss(apdev[0], apdev[0]['ifname'], 'bss-1.conf')
|
||||||
hostapd.add_bss(apdev[0], apdev[0]['ifname'] + '-2', 'bss-2.conf')
|
hostapd.add_bss(apdev[0], apdev[0]['ifname'] + '-2', 'bss-2.conf')
|
||||||
hapd = hostapd.Hostapd(apdev[0]['ifname'])
|
|
||||||
hapd.disable()
|
hapd.disable()
|
||||||
if "FAIL" not in hapd.request("DISABLE"):
|
if "FAIL" not in hapd.request("DISABLE"):
|
||||||
raise Exception("Second DISABLE accepted unexpectedly")
|
raise Exception("Second DISABLE accepted unexpectedly")
|
||||||
|
@ -421,14 +420,11 @@ def test_ap_multi_bss(dev, apdev):
|
||||||
"""Multiple BSSes with hostapd"""
|
"""Multiple BSSes with hostapd"""
|
||||||
ifname1 = apdev[0]['ifname']
|
ifname1 = apdev[0]['ifname']
|
||||||
ifname2 = apdev[0]['ifname'] + '-2'
|
ifname2 = apdev[0]['ifname'] + '-2'
|
||||||
hostapd.add_bss(apdev[0], ifname1, 'bss-1.conf')
|
hapd1 = hostapd.add_bss(apdev[0], ifname1, 'bss-1.conf')
|
||||||
hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf')
|
hapd2 = hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf')
|
||||||
dev[0].connect("bss-1", key_mgmt="NONE", scan_freq="2412")
|
dev[0].connect("bss-1", key_mgmt="NONE", scan_freq="2412")
|
||||||
dev[1].connect("bss-2", key_mgmt="NONE", scan_freq="2412")
|
dev[1].connect("bss-2", key_mgmt="NONE", scan_freq="2412")
|
||||||
|
|
||||||
hapd1 = hostapd.Hostapd(ifname1)
|
|
||||||
hapd2 = hostapd.Hostapd(ifname2)
|
|
||||||
|
|
||||||
hwsim_utils.test_connectivity(dev[0], hapd1)
|
hwsim_utils.test_connectivity(dev[0], hapd1)
|
||||||
hwsim_utils.test_connectivity(dev[1], hapd2)
|
hwsim_utils.test_connectivity(dev[1], hapd2)
|
||||||
|
|
||||||
|
|
|
@ -2255,8 +2255,7 @@ def test_ap_wps_auto_setup_with_config_file(dev, apdev):
|
||||||
f.write("ssid=wps\n")
|
f.write("ssid=wps\n")
|
||||||
f.write("eap_server=1\n")
|
f.write("eap_server=1\n")
|
||||||
f.write("wps_state=1\n")
|
f.write("wps_state=1\n")
|
||||||
hostapd.add_bss(apdev[0], ifname, conffile)
|
hapd = hostapd.add_bss(apdev[0], ifname, conffile)
|
||||||
hapd = hostapd.Hostapd(ifname)
|
|
||||||
hapd.request("WPS_PBC")
|
hapd.request("WPS_PBC")
|
||||||
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||||
dev[0].request("WPS_PBC " + apdev[0]['bssid'])
|
dev[0].request("WPS_PBC " + apdev[0]['bssid'])
|
||||||
|
|
Loading…
Reference in a new issue