aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/hwsim/test_wpas_ctrl.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/hwsim/test_wpas_ctrl.py b/tests/hwsim/test_wpas_ctrl.py
index 1c84eb0..59637d6 100644
--- a/tests/hwsim/test_wpas_ctrl.py
+++ b/tests/hwsim/test_wpas_ctrl.py
@@ -1364,6 +1364,30 @@ def test_wpas_ctrl_interface_add(dev, apdev):
dev[0].global_request("INTERFACE_REMOVE " + ifname)
hwsim_utils.test_connectivity(dev[0], hapd)
+def test_wpas_ctrl_interface_add_many(dev, apdev):
+ """wpa_supplicant INTERFACE_ADD/REMOVE with vif creation/removal (many)"""
+ try:
+ _test_wpas_ctrl_interface_add_many(dev, apdev)
+ finally:
+ for i in range(10):
+ ifname = "test%d-" % i + dev[0].ifname
+ dev[0].global_request("INTERFACE_REMOVE " + ifname)
+
+def _test_wpas_ctrl_interface_add_many(dev, apdev):
+ hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
+ dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
+ hwsim_utils.test_connectivity(dev[0], hapd)
+
+ l = []
+ for i in range(10):
+ ifname = "test%d-" % i + dev[0].ifname
+ dev[0].interface_add(ifname, create=True)
+ wpas = WpaSupplicant(ifname=ifname)
+ wpas.connect("open", key_mgmt="NONE", scan_freq="2412")
+ l.append(wpas)
+ for wpas in l:
+ hwsim_utils.test_connectivity(wpas, hapd)
+
def test_wpas_ctrl_interface_add2(dev, apdev):
"""wpa_supplicant INTERFACE_ADD/REMOVE with vif without creation/removal"""
ifname = "test-ext-" + dev[0].ifname