]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix dpp_qr_code_auth_initiator_enrollee to clear gas_address3
authorJouni Malinen <jouni@codeaurora.org>
Wed, 13 Mar 2019 22:13:35 +0000 (00:13 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 13 Mar 2019 22:13:35 +0000 (00:13 +0200)
gas_address3 was set to 1 in this test case, but it was never cleared.
That can result in unexpected behavior in other test cases that dpeends
on gas_address3 being in its default value 0. Clear the parameter
explicitly to avoid this.

This resulted in an error in the following test sequence:
dpp_qr_code_auth_initiator_enrollee gas_anqp_address3_ap_forced

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_dpp.py

index 616c91e4f715ed29ff88dd9826d8e21f4242771b..f7ea5233a02ef8d6de0455b2227639e97d841ac3 100644 (file)
@@ -667,6 +667,13 @@ def test_dpp_qr_code_listen_continue(dev, apdev):
 
 def test_dpp_qr_code_auth_initiator_enrollee(dev, apdev):
     """DPP QR Code and authentication exchange (Initiator in Enrollee role)"""
+    try:
+        run_dpp_qr_code_auth_initiator_enrollee(dev, apdev)
+    finally:
+        dev[0].set("gas_address3", "0")
+        dev[1].set("gas_address3", "0")
+
+def run_dpp_qr_code_auth_initiator_enrollee(dev, apdev):
     check_dpp_capab(dev[0])
     check_dpp_capab(dev[1])
     dev[0].request("SET gas_address3 1")