]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: WPS ER restart and stop
authorJouni Malinen <j@w1.fi>
Sat, 13 Dec 2014 17:51:03 +0000 (19:51 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 14 Dec 2014 00:28:03 +0000 (02:28 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_wps.py

index 93905a6a85f5ded6d67d7cedc4622e9e1e1c95d8..80606cde081b6ce256d195354fee05be44db71c9 100644 (file)
@@ -1116,6 +1116,18 @@ def test_ap_wps_er_config_ap(dev, apdev):
     dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"])
     dev[0].connect(ssid, psk="1234567890", scan_freq="2412")
 
+    logger.info("WPS ER restart")
+    dev[0].request("WPS_ER_START")
+    ev = dev[0].wait_event(["WPS-ER-AP-ADD"], timeout=15)
+    if ev is None:
+        raise Exception("AP discovery timed out on ER restart")
+    if ap_uuid not in ev:
+        raise Exception("Expected AP UUID not found on ER restart")
+    if "OK" not in dev[0].request("WPS_ER_STOP"):
+        raise Exception("WPS_ER_STOP failed")
+    if "OK" not in dev[0].request("WPS_ER_STOP"):
+        raise Exception("WPS_ER_STOP failed")
+
 def test_ap_wps_fragmentation(dev, apdev):
     """WPS with fragmentation in EAP-WSC and mixed mode WPA+WPA2"""
     ssid = "test-wps-fragmentation"