From: Jouni Malinen Date: Sun, 2 Feb 2014 22:01:39 +0000 (+0200) Subject: tests: Verify WPS ER behavior on selecting a single Enrollee X-Git-Tag: hostap_2_1~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11c26f1b4a89688bcbbeb9eb44b97c018b06e321;p=thirdparty%2Fhostap.git tests: Verify WPS ER behavior on selecting a single Enrollee Signed-hostap: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 6d67645de..198390f1a 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -646,6 +646,25 @@ def test_ap_wps_er_add_enrollee(dev, apdev): raise Exception("WPS ER did not report success") hwsim_utils.test_connectivity_sta(dev[0], dev[1]) + logger.info("Add a specific Enrollee using ER") + pin = dev[2].wps_read_pin() + addr2 = dev[2].p2p_interface_addr() + dev[0].dump_monitor() + dev[2].dump_monitor() + dev[2].request("WPS_PIN any " + pin) + ev = dev[0].wait_event(["WPS-ER-ENROLLEE-ADD"], timeout=10) + if ev is None: + raise Exception("Enrollee not seen") + if addr2 not in ev: + raise Exception("Unexpected Enrollee MAC address") + dev[0].request("WPS_ER_PIN " + addr2 + " " + pin + " " + addr2) + ev = dev[2].wait_event(["CTRL-EVENT-CONNECTED"], timeout=15) + if ev is None: + raise Exception("Association with the AP timed out") + ev = dev[0].wait_event(["WPS-SUCCESS"], timeout=15) + if ev is None: + raise Exception("WPS ER did not report success") + logger.info("Verify registrar selection behavior") dev[0].request("WPS_ER_PIN any " + pin + " " + dev[1].p2p_interface_addr()) dev[1].request("DISCONNECT")