]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Remove group at the end of p2p_ext_vendor_elem_invitation
authorJouni Malinen <j@w1.fi>
Sun, 17 Mar 2019 15:06:04 +0000 (17:06 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 17 Mar 2019 15:06:04 +0000 (17:06 +0200)
This is needed to avoid leaving behind a ROC operation at the end of the
test case. This was found with the following test sequence:
p2p_ext_vendor_elem_invitation wifi_display_r2

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_p2p_ext.py

index b9676370ded345f91d3a0ff01ae81dcf001e43bd..2c23ee9a0b788595d0b6bac4c400eb521410dfb8 100644 (file)
@@ -311,6 +311,9 @@ def _test_p2p_ext_vendor_elem_invitation(dev):
     dev[0].p2p_stop_find()
     dev[1].p2p_stop_find()
 
+    dev[0].dump_monitor()
+    dev[1].dump_monitor()
+
     dev[0].p2p_listen()
     if "FAIL" in dev[1].request("SET ext_mgmt_frame_handling 0"):
         raise Exception("Failed to disable external management frame handling")
@@ -329,6 +332,11 @@ def _test_p2p_ext_vendor_elem_invitation(dev):
             break
     if "dd050011223307" not in ev:
         raise Exception("Vendor element not found from Invitation Response frame")
+    ev = dev[0].wait_global_event(["P2P-GROUP-STARTED"], timeout=5)
+    if ev is None:
+        raise Exception("Group start not reported")
+    dev[0].group_form_result(ev)
+    dev[0].remove_group()
     dev[0].p2p_stop_find()
     dev[1].p2p_stop_find()