[PATCH] tests: Fix ap_ft_eap_pull_wildcard_multi_bss

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 tests/hwsim/test_ap_ft.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/hwsim/test_ap_ft.py b/tests/hwsim/test_ap_ft.py
index f2ca6f1ea0..03bc67387d 100644
--- a/tests/hwsim/test_ap_ft.py
+++ b/tests/hwsim/test_ap_ft.py
@@ -1595,7 +1595,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)
 
-- 
2.28.0


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux