]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix ap_ft_eap_pull_wildcard_multi_bss
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Wed, 23 Dec 2020 10:17:10 +0000 (12:17 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 15 Jan 2021 10:20:49 +0000 (12:20 +0200)
Python enumerates dictionaries in an arbitrary order, thus the resulting
configuration file will have the parameters shuffled randomly. This may
cause the test to fail when, for example, auth_server_addr is placed
after auth_server_port. Fix this by enforcing some of the fields to be
placed before the others.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
tests/hwsim/test_ap_ft.py

index 1099d3bd21c86ecef97fccb0be87bc8843257812..12d4c1395ede83315edfea0cdf974328868d976b 100644 (file)
@@ -1606,7 +1606,14 @@ def test_ap_ft_eap_pull_wildcard_multi_bss(dev, apdev, params):
         f.write("interface=%s\n" % ifname2)
         f.write("bssid=%s\n" % bssid2)
         f.write("ctrl_interface=/var/run/hostapd\n")
+
+        fields = ["ssid", "wpa_passphrase", "nas_identifier", "wpa_key_mgmt",
+                  "wpa", "rsn_pairwise", "auth_server_addr"]
+        for name in fields:
+            f.write("%s=%s\n" % (name, params[name]))
         for name, val in params.items():
+            if name in fields:
+                continue
             f.write("%s=%s\n" % (name, val))
     hapd2 = hostapd.add_bss(apdev[0], ifname2, bssconf)