]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Setup wlantest once for qosmap tests
authorJonathan Afek <jonathan@wizery.com>
Wed, 13 Jul 2016 17:06:05 +0000 (20:06 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 17 Sep 2016 19:14:06 +0000 (22:14 +0300)
Some tests call the check_qos_map() function more than once. Make sure
each test sets up wlantest only once before the first time the function
is called.

The wlantest setup sets the channel for the wlantest interface and
executes the wlantest executable. It is more efficient to do that only
once for each test.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
tests/hwsim/test_ap_qosmap.py

index ffe8ca0d1cf09f60c8db4d6324a8dd9ba81b44bb..3119a98bfee0721321b99f3b0ba2d5ba1c40f514 100644 (file)
@@ -18,7 +18,6 @@ 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)
     wt = Wlantest()
     wt.clear_sta_counters(bssid, sta)
     hwsim_utils.test_connectivity(dev, hapd, dscp=dscp, config=False)
@@ -50,6 +49,7 @@ def test_ap_qosmap(dev, apdev):
     addr = dev[0].p2p_interface_addr()
     dev[0].request("DATA_TEST_CONFIG 1")
     hapd.request("DATA_TEST_CONFIG 1")
+    Wlantest.setup(hapd)
     check_qos_map(apdev[0], hapd, dev[0], addr, 53, 2)
     check_qos_map(apdev[0], hapd, dev[0], addr, 22, 6)
     check_qos_map(apdev[0], hapd, dev[0], addr, 8, 0)
@@ -85,6 +85,7 @@ def test_ap_qosmap_default(dev, apdev):
     addr = dev[0].p2p_interface_addr()
     dev[0].request("DATA_TEST_CONFIG 1")
     hapd.request("DATA_TEST_CONFIG 1")
+    Wlantest.setup(hapd)
     for dscp in [ 0, 7, 8, 15, 16, 23, 24, 31, 32, 39, 40, 47, 48, 55, 56, 63]:
         check_qos_map(apdev[0], hapd, dev[0], addr, dscp, dscp >> 3)
     dev[0].request("DATA_TEST_CONFIG 0")
@@ -120,6 +121,7 @@ def test_ap_qosmap_default_acm(dev, apdev):
     addr = dev[0].p2p_interface_addr()
     dev[0].request("DATA_TEST_CONFIG 1")
     hapd.request("DATA_TEST_CONFIG 1")
+    Wlantest.setup(hapd)
     for dscp in [ 0, 7, 8, 15, 16, 23, 24, 31, 32, 39, 40, 47, 48, 55, 56, 63]:
         ap_tid = dscp >> 3
         tid = ap_tid