From: Jouni Malinen Date: Thu, 15 May 2014 21:57:40 +0000 (+0300) Subject: tests: Verify that WPS operation report failure if WPS is disabled X-Git-Tag: hostap_2_2~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d352c407e32c1eb210ce21afaf40574f0eb60bc3;p=thirdparty%2Fhostap.git tests: Verify that WPS operation report failure if WPS is disabled Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 0d29d9cb6..5fbfacc46 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -2092,3 +2092,13 @@ def test_ap_wps_upnp_subscribe(dev, apdev): raise Exception("Unexpected HTTP response: %s" % resp.status) sid = resp.getheader("sid") logger.debug("Subscription SID " + sid) + +def test_ap_wps_disabled(dev, apdev): + """WPS operations while WPS is disabled""" + ssid = "test-wps-disabled" + hostapd.add_ap(apdev[0]['ifname'], { "ssid": ssid }) + hapd = hostapd.Hostapd(apdev[0]['ifname']) + if "FAIL" not in hapd.request("WPS_PBC"): + raise Exception("WPS_PBC succeeded unexpectedly") + if "FAIL" not in hapd.request("WPS_CANCEL"): + raise Exception("WPS_CANCEL succeeded unexpectedly")