From: Jouni Malinen Date: Mon, 26 Jan 2026 17:39:58 +0000 (+0200) Subject: tests: Fix nan_usd_match_p2p termination X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46e71c410475c0106fb2e1359bafd3858219045e;p=thirdparty%2Fhostap.git tests: Fix nan_usd_match_p2p termination 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 --- diff --git a/tests/hwsim/test_nan_usd.py b/tests/hwsim/test_nan_usd.py index 88b461cc1..749cc217a 100644 --- a/tests/hwsim/test_nan_usd.py +++ b/tests/hwsim/test_nan_usd.py @@ -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()