[PATCH 5/8] tests: setup the wlantest only once in check_qos_map()

Jonathan Afek jonathan at wizery.com
Thu Jun 23 10:16:33 PDT 2016


Some tests call the check_qos_map() func more than once.
Make sure it setups the wlantest only once on the first
time it is called.

Signed-off-by: Jonathan Afek <jonathanx.afek at intel.com>
---
 tests/hwsim/test_ap_qosmap.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/hwsim/test_ap_qosmap.py b/tests/hwsim/test_ap_qosmap.py
index 48348bf..a98176b 100644
--- a/tests/hwsim/test_ap_qosmap.py
+++ b/tests/hwsim/test_ap_qosmap.py
@@ -17,7 +17,8 @@ def check_qos_map(ap, hapd, dev, sta, dscp, tid, ap_tid=None):
     if not ap_tid:
         ap_tid = tid
     bssid = ap['bssid']
-    Wlantest.setup(hapd)
+    if not Wlantest.setup_done:
+        Wlantest.setup(hapd)
     wt = Wlantest()
     wt.clear_sta_counters(bssid, sta)
     hwsim_utils.test_connectivity(dev, hapd, dscp=dscp, config=False)
-- 
1.9.1




More information about the Hostap mailing list