aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>2016-04-07 05:38:05 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-24 16:26:11 (GMT)
commitdc6342de921928497e4ec53057932755b22da3dc (patch)
treee92fba8a18263eb0aac6fa289cf5a569a28f69db /tests
parent1728a2e73c8342738a56540b1f44c1f6ce4a5f39 (diff)
downloadhostap-dc6342de921928497e4ec53057932755b22da3dc.zip
hostap-dc6342de921928497e4ec53057932755b22da3dc.tar.gz
hostap-dc6342de921928497e4ec53057932755b22da3dc.tar.bz2
tests: Pass apdev to HostapdGlobal()
This can be used to work with remote hosts. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_dynamic.py2
-rw-r--r--tests/hwsim/test_ap_hs20.py4
-rw-r--r--tests/hwsim/test_hapd_ctrl.py2
-rw-r--r--tests/hwsim/test_pmksa_cache.py4
-rw-r--r--tests/hwsim/test_rfkill.py2
5 files changed, 7 insertions, 7 deletions
diff --git a/tests/hwsim/test_ap_dynamic.py b/tests/hwsim/test_ap_dynamic.py
index 676fbda..76fdaf1 100644
--- a/tests/hwsim/test_ap_dynamic.py
+++ b/tests/hwsim/test_ap_dynamic.py
@@ -338,7 +338,7 @@ def test_ap_bss_add_many(dev, apdev):
finally:
dev[0].request("SCAN_INTERVAL 5")
ifname = apdev[0]['ifname']
- hapd = hostapd.HostapdGlobal()
+ hapd = hostapd.HostapdGlobal(apdev[0])
hapd.flush()
for i in range(16):
ifname2 = ifname + '-' + str(i)
diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py
index 1d449a1..a4e6179 100644
--- a/tests/hwsim/test_ap_hs20.py
+++ b/tests/hwsim/test_ap_hs20.py
@@ -1732,7 +1732,7 @@ def test_ap_hs20_min_bandwidth_home_hidden_ssid_in_scan_res(dev, apdev):
"ignore_broadcast_ssid": "1" })
dev[0].scan_for_bss(bssid, freq=2412)
hapd.disable()
- hapd_global = hostapd.HostapdGlobal()
+ hapd_global = hostapd.HostapdGlobal(apdev[0])
hapd_global.flush()
hapd_global.remove(apdev[0]['ifname'])
@@ -2898,7 +2898,7 @@ def test_ap_hs20_hidden_ssid_in_scan_res(dev, apdev):
"ignore_broadcast_ssid": "1" })
dev[0].scan_for_bss(bssid, freq=2412)
hapd.disable()
- hapd_global = hostapd.HostapdGlobal()
+ hapd_global = hostapd.HostapdGlobal(apdev[0])
hapd_global.flush()
hapd_global.remove(apdev[0]['ifname'])
diff --git a/tests/hwsim/test_hapd_ctrl.py b/tests/hwsim/test_hapd_ctrl.py
index 76888b6..f395d75 100644
--- a/tests/hwsim/test_hapd_ctrl.py
+++ b/tests/hwsim/test_hapd_ctrl.py
@@ -446,7 +446,7 @@ def test_hapd_ctrl_global(dev, apdev):
params = { "ssid": ssid }
ifname = apdev[0]['ifname']
hapd = hostapd.add_ap(apdev[0], params)
- hapd_global = hostapd.HostapdGlobal()
+ hapd_global = hostapd.HostapdGlobal(apdev[0])
res = hapd_global.request("IFNAME=" + ifname + " PING")
if "PONG" not in res:
raise Exception("Could not ping hostapd interface " + ifname + " via global control interface")
diff --git a/tests/hwsim/test_pmksa_cache.py b/tests/hwsim/test_pmksa_cache.py
index 88a8df8..1cb0724 100644
--- a/tests/hwsim/test_pmksa_cache.py
+++ b/tests/hwsim/test_pmksa_cache.py
@@ -756,7 +756,7 @@ def test_pmksa_cache_size_limit(dev, apdev):
_test_pmksa_cache_size_limit(dev, apdev)
finally:
try:
- hapd = hostapd.HostapdGlobal()
+ hapd = hostapd.HostapdGlobal(apdev[0])
hapd.flush()
hapd.remove(apdev[0]['ifname'])
except:
@@ -791,7 +791,7 @@ def _test_pmksa_cache_size_limit(dev, apdev):
elif i + 1 != entries:
raise Exception("Unexpected number of PMKSA entries")
- hapd = hostapd.HostapdGlobal()
+ hapd = hostapd.HostapdGlobal(apdev[0])
hapd.flush()
hapd.remove(apdev[0]['ifname'])
diff --git a/tests/hwsim/test_rfkill.py b/tests/hwsim/test_rfkill.py
index cb1e863..3b0aa6c 100644
--- a/tests/hwsim/test_rfkill.py
+++ b/tests/hwsim/test_rfkill.py
@@ -207,7 +207,7 @@ def test_rfkill_hostapd(dev, apdev):
dev[0].request("DISCONNECT")
hapd.disable()
- hglobal = HostapdGlobal()
+ hglobal = HostapdGlobal(apdev[0])
hglobal.flush()
hglobal.remove(apdev[0]['ifname'])