]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make test_autogo validate group removal event on client
authorJouni Malinen <j@w1.fi>
Sat, 31 Aug 2013 14:59:16 +0000 (17:59 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 31 Aug 2013 14:59:16 +0000 (17:59 +0300)
Use test_autogo to verify that P2P client is able to notice explicit
group session termination message from the GO. This would have caught
the regression in processing P2P deauthentication notifications.

Signed-hostap: Jouni Malinen <j@w1.fi>

tests/hwsim/test_p2p_autogo.py

index e787570282893877570a627ac2e00ebdfc44c510..1d1dab1fb49e8877411a887f5b82eaf1a7a49cec 100644 (file)
@@ -32,10 +32,11 @@ def test_autogo(dev):
     autogo(dev[0])
     connect_cli(dev[0], dev[1])
     dev[0].remove_group()
-    try:
-        dev[1].remove_group()
-    except:
-        pass
+    ev = dev[1].wait_event(["P2P-GROUP-REMOVED"], timeout=2)
+    if ev is None:
+        raise Exception("Group removal event timed out")
+    if "reason=GO_ENDING_SESSION" not in ev:
+        raise Exception("Unexpected group removal reason")
 
 def test_autogo_2cli(dev):
     """P2P autonomous GO and two clients joining group"""