tests: Make test_autogo validate group removal event on client

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>
This commit is contained in:
Jouni Malinen 2013-08-31 17:59:16 +03:00
parent 02a3e5c0d1
commit dd850f4a11

View file

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