]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: SELECT_NETWORK any
authorJouni Malinen <j@w1.fi>
Sat, 26 Apr 2014 18:10:56 +0000 (21:10 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 29 Apr 2014 09:52:10 +0000 (12:52 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_open.py

index 74f6038dc1599b8d9892c901395f40373d2c8a6c..e3ae32f4201c32d46cf4383a9816cdab64aea5a3 100644 (file)
@@ -120,3 +120,20 @@ def test_ap_open_id_str(dev, apdev):
         raise Exception("CTRL-EVENT-CONNECT did not have matching id_str: " + ev)
     if dev[0].get_status_field("id_str") != "foo":
         raise Exception("id_str mismatch")
+
+def test_ap_open_select_any(dev, apdev):
+    """AP with open mode and select any network"""
+    hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
+    id = dev[0].connect("unknown", key_mgmt="NONE", scan_freq="2412",
+                        only_add_network=True)
+    dev[0].connect("open", key_mgmt="NONE", scan_freq="2412",
+                   only_add_network=True)
+    dev[0].select_network(id)
+    ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=1)
+    if ev is not None:
+        raise Exception("Unexpected connection")
+
+    dev[0].select_network("any")
+    ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"])
+    if ev is None:
+        raise Exception("Association with the AP timed out")