]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix nan_usd_match_p2p termination
authorJouni Malinen <jouni.malinen@oss.qualcomm.com>
Mon, 26 Jan 2026 17:39:58 +0000 (19:39 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 26 Jan 2026 17:40:56 +0000 (19:40 +0200)
The NAN subscribe and publish cancellation commands used incorrect
parameter names and there was not enough time to allow the cancellation
to occur before terminating the parallel group. Fix these to avoid
reporting failures due to a race condition and parallel operations in
the end.

Signed-off-by: Jouni Malinen <jouni.malinen@oss.qualcomm.com>
tests/hwsim/test_nan_usd.py

index 88b461cc180d705e3109dcee4f61f25087331676..749cc217a18ff512a8960f40b166d7153245af26 100644 (file)
@@ -202,8 +202,11 @@ def test_nan_usd_match_p2p(dev, apdev):
     if "ssi=6677" not in ev.split(' '):
         raise Exception("Unexpected ssi: " + ev)
 
-    dev[0].request("NAN_CANCEL_SUBSCRIBE id=" + id0)
-    dev[1].request("NAN_CANCEL_PUBLISH id=" + id1)
+    if "OK" not in dev[0].request("NAN_CANCEL_SUBSCRIBE subscribe_id=" + id0):
+        raise Exception("NAN_CANCEL_SUBSCRIBE failed")
+    if "OK" not in dev[1].request("NAN_CANCEL_PUBLISH publish_id=" + id1):
+        raise Exception("NAN_CANCEL_PUBLISH failed")
+    time.sleep(1)
 
     dev[1].remove_group()
     dev[0].wait_go_ending_session()