From: Jouni Malinen Date: Sat, 12 Apr 2014 17:08:13 +0000 (+0300) Subject: tests: P2P group idle timeout on GO X-Git-Tag: hostap_2_2~292 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28cd90091e7cc84e9d72b199e1499309391c43f8;p=thirdparty%2Fhostap.git tests: P2P group idle timeout on GO Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_p2p_grpform.py b/tests/hwsim/test_p2p_grpform.py index 734d090e6..98c827cb2 100644 --- a/tests/hwsim/test_p2p_grpform.py +++ b/tests/hwsim/test_p2p_grpform.py @@ -146,10 +146,19 @@ def remove_group(dev1, dev2): def test_grpform(dev): """P2P group formation using PIN and authorized connection (init -> GO)""" - [i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15, - r_dev=dev[1], r_intent=0) - check_grpform_results(i_res, r_res) - remove_group(dev[0], dev[1]) + try: + dev[0].request("SET p2p_group_idle 2") + [i_res, r_res] = go_neg_pin_authorized(i_dev=dev[0], i_intent=15, + r_dev=dev[1], r_intent=0) + check_grpform_results(i_res, r_res) + dev[1].remove_group() + ev = dev[0].wait_global_event(["P2P-GROUP-REMOVED"], timeout=10) + if ev is None: + raise Exception("GO did not remove group on idle timeout") + if "GO reason=IDLE" not in ev: + raise Exception("Unexpected group removal event: " + ev) + finally: + dev[0].request("SET p2p_group_idle 0") def test_grpform_a(dev): """P2P group formation using PIN and authorized connection (init -> GO) (init: group iface)"""