]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: DPP_BOOTSTRAP_INFO with hostapd
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 4 Jul 2017 12:49:35 +0000 (15:49 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 4 Jul 2017 12:56:43 +0000 (15:56 +0300)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_dpp.py

index bbf37af1b7178a18d61d408c4d0fc3a56e6b33a5..7f0579104ebb5d4c64d3271d4ba8b65ee9471400 100644 (file)
@@ -1497,6 +1497,14 @@ def test_dpp_hostapd_configurator(dev, apdev):
         raise Exception("Failed to parse QR Code URI")
     id1 = int(res)
 
+    res = hapd.request("DPP_BOOTSTRAP_INFO %d" % id0)
+    if "FAIL" in res:
+        raise Exception("DPP_BOOTSTRAP_INFO failed")
+    if "type=QRCODE" not in res:
+        raise Exception("DPP_BOOTSTRAP_INFO did not report correct type")
+    if "mac_addr=" + dev[0].own_addr() not in res:
+        raise Exception("DPP_BOOTSTRAP_INFO did not report correct mac_addr")
+
     cmd = "DPP_LISTEN 2412"
     if "OK" not in dev[0].request(cmd):
         raise Exception("Failed to start listen operation")