From: Andrei Otcheretianski Date: Wed, 10 Jun 2015 08:43:38 +0000 (+0300) Subject: tests: Fix p2ps_connect_adv_go_pin_method case X-Git-Tag: hostap_2_5~632 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce394d33e78fcc091424a7a5d5872d0a9a4c5752;p=thirdparty%2Fhostap.git tests: Fix p2ps_connect_adv_go_pin_method case test_p2ps_connect_adv_go_pin_method() expects that p2ps_provision_keypad_method() returns P2PS-PROV-DONE with details needed for a connection. However, this event was overridden which resulted in an incorrect test flow skipping the connection establishement. The test would pass, however, without really trying to connect. Fix this by returning the correct event. Signed-off-by: Andrei Otcheretianski Reviewed-by: Ilan Peer --- diff --git a/tests/hwsim/test_p2ps.py b/tests/hwsim/test_p2ps.py index e2d68a846..1d1e612c3 100644 --- a/tests/hwsim/test_p2ps.py +++ b/tests/hwsim/test_p2ps.py @@ -174,10 +174,10 @@ def p2ps_provision_keypad_method(i_dev, r_dev, autoaccept, ev1 = i_dev.wait_global_event(["P2PS-PROV-DONE"], timeout=10) if ev1 is None: raise Exception("P2PS-PROV-DONE timeout on seeker side") - ev1 = i_dev.wait_global_event(["P2P-PROV-DISC-ENTER-PIN"], timeout=10) - if ev1 is None: + ev2 = i_dev.wait_global_event(["P2P-PROV-DISC-ENTER-PIN"], timeout=10) + if ev2 is None: raise Exception("P2P-PROV-DISC-ENTER-PIN failed on seeker side") - if r_dev.p2p_dev_addr() not in ev1: + if r_dev.p2p_dev_addr() not in ev2: raise Exception("Unknown peer ") return ev1