]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Pass apdev to HostapdGlobal()
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Thu, 7 Apr 2016 05:38:05 +0000 (07:38 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 24 Apr 2016 16:26:11 +0000 (19:26 +0300)
This can be used to work with remote hosts.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
tests/hwsim/test_ap_dynamic.py
tests/hwsim/test_ap_hs20.py
tests/hwsim/test_hapd_ctrl.py
tests/hwsim/test_pmksa_cache.py
tests/hwsim/test_rfkill.py

index 676fbda4efc44ed6c9ddd3266ab63bf9b8b0fcf0..76fdaf151cfa9e663a0a1bd0ae28f86baec805f1 100644 (file)
@@ -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)
index 1d449a1c14d6756d484a4cfdc9409888fdaa7519..a4e6179b1ff55cb4d1436b19b36c5617e11e22f1 100644 (file)
@@ -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'])
 
index 76888b63f3bde897600ae77580add8541580334e..f395d75bf0818eb9ec08e73b89953eac9d3ef922 100644 (file)
@@ -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")
index 88a8df8795f9f1a9fd248301c9451eea00a12b02..1cb0724a7b70ce8b3856539406dd78d1e49901b2 100644 (file)
@@ -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'])
 
index cb1e8636a6b7589f51b8bb3738360e84d0a31529..3b0aa6ccede55963f0313dd7c675a6e1a6905a00 100644 (file)
@@ -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'])