Browse Source

tests: NFC_REPORT_HANDOVER error cases

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen 11 years ago
parent
commit
d6e88ee9e8
1 changed files with 15 additions and 0 deletions
  1. 15 0
      tests/hwsim/test_wpas_ctrl.py

+ 15 - 0
tests/hwsim/test_wpas_ctrl.py

@@ -580,3 +580,18 @@ def test_wpas_ctrl_get_capability(dev):
 
     if dev[0].get_capability("foo") is not None:
         raise Exception("Unexpected GET_CAPABILITY foo response: " + str(res))
+
+def test_wpas_ctrl_nfc_report_handover(dev):
+    """wpa_supplicant ctrl_iface NFC_REPORT_HANDOVER"""
+    vals = [ "FOO",
+             "ROLE freq=12345",
+             "ROLE TYPE",
+             "ROLE TYPE REQ",
+             "ROLE TYPE REQ SEL",
+             "ROLE TYPE 0Q SEL",
+             "ROLE TYPE 00 SEL",
+             "ROLE TYPE 00 0Q",
+             "ROLE TYPE 00 00" ]
+    for v in vals:
+        if "FAIL" not in dev[0].request("NFC_REPORT_HANDOVER " + v):
+            raise Exception("Unexpected NFC_REPORT_HANDOVER success for " + v)