]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Check STATUS mode field during P2P group formation
authorJouni Malinen <j@w1.fi>
Sun, 7 Dec 2014 16:17:31 +0000 (18:17 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 8 Dec 2014 09:07:56 +0000 (11:07 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_p2p_grpform.py

index 9a978cd422641d59da483ffe4407be2e3c2989e0..eaff0f6754cba059adb59df8f13f1fe3b4fe2593 100644 (file)
@@ -774,10 +774,13 @@ def test_grpform_no_wsc_done(dev):
         dev[0].p2p_go_neg_init(addr1, "12345670", "enter", timeout=20,
                                go_intent=15, wait_group=False)
 
+        mode = None
         while True:
             ev = dev[0].wait_event(["EAPOL-TX"], timeout=15)
             if ev is None:
                 raise Exception("Timeout on EAPOL-TX from GO")
+            if not mode:
+                mode = dev[0].get_status_field("mode")
             res = dev[1].request("EAPOL_RX " + addr0 + " " + ev.split(' ')[2])
             if "OK" not in res:
                 raise Exception("EAPOL_RX failed")
@@ -805,6 +808,9 @@ def test_grpform_no_wsc_done(dev):
             raise Exception("Group formation timed out on P2P Client")
         dev[0].remove_group()
 
+        if mode != "P2P GO - group formation":
+            raise Exception("Unexpected mode on GO during group formation: " + mode)
+
 def test_grpform_wait_peer(dev):
     """P2P group formation wait for peer to become ready"""
     addr0 = dev[0].p2p_dev_addr()