]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: WPS operation with other networks already configured
authorJouni Malinen <j@w1.fi>
Sun, 6 Apr 2014 08:03:26 +0000 (11:03 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 6 Apr 2014 09:31:45 +0000 (12:31 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_wps.py

index 9ea15abb9b587b46a6184136b90e395acb70e8ea..9f4cae1dadb1cc2a7e34abbb73bb61123c8f6a69 100644 (file)
@@ -30,7 +30,18 @@ def test_ap_wps_init(dev, apdev):
     hapd.request("WPS_PBC")
     if "PBC Status: Active" not in hapd.request("WPS_GET_STATUS"):
         raise Exception("PBC status not shown correctly")
-    dev[0].dump_monitor()
+
+    id = dev[0].add_network()
+    dev[0].set_network_quoted(id, "ssid", "home")
+    dev[0].set_network_quoted(id, "psk", "12345678")
+    dev[0].request("ENABLE_NETWORK %s no-connect" % id)
+
+    id = dev[0].add_network()
+    dev[0].set_network_quoted(id, "ssid", "home2")
+    dev[0].set_network(id, "bssid", "00:11:22:33:44:55")
+    dev[0].set_network(id, "key_mgmt", "NONE")
+    dev[0].request("ENABLE_NETWORK %s no-connect" % id)
+
     dev[0].request("WPS_PBC")
     ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=30)
     if ev is None:
@@ -62,6 +73,9 @@ def test_ap_wps_init(dev, apdev):
     if "group_cipher=TKIP" not in conf:
         raise Exception("Unexpected group_cipher")
 
+    if len(dev[0].list_networks()) != 3:
+        raise Exception("Unexpected number of network blocks")
+
 def test_ap_wps_init_2ap_pbc(dev, apdev):
     """Initial two-radio AP configuration with first WPS PBC Enrollee"""
     ssid = "test-wps"