]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Verify P2P GO start when scan_req = MANUAL_SCAN_REQ
authorJouni Malinen <j@w1.fi>
Tue, 13 May 2014 23:31:55 +0000 (02:31 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 15 May 2014 13:56:49 +0000 (16:56 +0300)
There was a bug in this code path that resulted in the
skip-scan-to-start-GO case to not actually skip the scan. It looks like
this could be hit at least when autoscan was enabled, but it is possible
that some other sequences could hit this as well.

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

index 3df813e91032821ccb6158644b09486ceea537f0..315036dd8e4ec07d8d90aa8e8b5b76d8640070e9 100644 (file)
@@ -334,3 +334,16 @@ def test_autogo_ifdown(dev):
         raise Exception("Group removal not reported")
     if res['ifname'] not in ev:
         raise Exception("Unexpected group removal event: " + ev)
+
+def test_autogo_start_during_scan(dev):
+    """P2P autonomous GO started during ongoing manual scan"""
+    try:
+        # use autoscan to set scan_req = MANUAL_SCAN_REQ
+        if "OK" not in dev[0].request("AUTOSCAN periodic:1"):
+            raise Exception("Failed to set autoscan")
+        autogo(dev[0])
+        connect_cli(dev[0], dev[1])
+        dev[0].remove_group()
+        dev[1].wait_go_ending_session()
+    finally:
+        dev[0].request("AUTOSCAN ")