aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>2016-04-07 05:38:06 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-24 16:26:25 (GMT)
commit50e49cd24002aa0cc372a8765b046e3d50558236 (patch)
tree36147d2e045505123442bdf2c61e02472b98bbf7 /tests
parentdc6342de921928497e4ec53057932755b22da3dc (diff)
downloadhostap-50e49cd24002aa0cc372a8765b046e3d50558236.zip
hostap-50e49cd24002aa0cc372a8765b046e3d50558236.tar.gz
hostap-50e49cd24002aa0cc372a8765b046e3d50558236.tar.bz2
tests: Use hapd from hostapd.add_iface()
Since add_iface() now returns the correct hapd, just use it. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_acs.py4
-rw-r--r--tests/hwsim/test_ap_dynamic.py6
-rw-r--r--tests/hwsim/test_ap_vlan.py5
3 files changed, 4 insertions, 11 deletions
diff --git a/tests/hwsim/test_ap_acs.py b/tests/hwsim/test_ap_acs.py
index 05e1ad1..89abb24 100644
--- a/tests/hwsim/test_ap_acs.py
+++ b/tests/hwsim/test_ap_acs.py
@@ -89,12 +89,10 @@ def test_ap_acs_chanlist(dev, apdev):
def test_ap_multi_bss_acs(dev, apdev):
"""hostapd start with a multi-BSS configuration file using ACS"""
skip_with_fips(dev[0])
- ifname = apdev[0]['ifname']
force_prev_ap_on_24g(apdev[0])
# start the actual test
- hostapd.add_iface(apdev[0], 'multi-bss-acs.conf')
- hapd = hostapd.Hostapd(ifname)
+ hapd = hostapd.add_iface(apdev[0], 'multi-bss-acs.conf')
hapd.enable()
wait_acs(hapd)
diff --git a/tests/hwsim/test_ap_dynamic.py b/tests/hwsim/test_ap_dynamic.py
index 76fdaf1..7dab735 100644
--- a/tests/hwsim/test_ap_dynamic.py
+++ b/tests/hwsim/test_ap_dynamic.py
@@ -182,8 +182,7 @@ def test_ap_multi_bss_config(dev, apdev):
ifname2 = apdev[0]['ifname'] + '-2'
ifname3 = apdev[0]['ifname'] + '-3'
logger.info("Set up three BSSes with one configuration file")
- hostapd.add_iface(apdev[0], 'multi-bss.conf')
- hapd = hostapd.Hostapd(ifname1)
+ hapd = hostapd.add_iface(apdev[0], 'multi-bss.conf')
hapd.enable()
multi_check(dev, [ True, True, True ])
hostapd.remove_bss(apdev[0], ifname2)
@@ -193,8 +192,7 @@ def test_ap_multi_bss_config(dev, apdev):
hostapd.remove_bss(apdev[0], ifname1)
multi_check(dev, [ False, False, False ])
- hostapd.add_iface(apdev[0], 'multi-bss.conf')
- hapd = hostapd.Hostapd(ifname1)
+ hapd = hostapd.add_iface(apdev[0], 'multi-bss.conf')
hapd.enable()
hostapd.remove_bss(apdev[0], ifname1)
multi_check(dev, [ False, False, False ])
diff --git a/tests/hwsim/test_ap_vlan.py b/tests/hwsim/test_ap_vlan.py
index 79c4166..7ca4eda 100644
--- a/tests/hwsim/test_ap_vlan.py
+++ b/tests/hwsim/test_ap_vlan.py
@@ -327,11 +327,8 @@ def ap_vlan_iface_cleanup_multibss(dev, apdev, cfgfile):
"vlan_naming": "1" }
authserv = hostapd.add_ap(apdev[1], as_params)
- ifname = apdev[0]['ifname']
-
# start the actual test
- hostapd.add_iface(apdev[0], cfgfile)
- hapd = hostapd.Hostapd(ifname)
+ hapd = hostapd.add_iface(apdev[0], cfgfile)
hapd1 = hostapd.Hostapd("wlan3-2", 1)
hapd1.enable()