From f250c34d1065dce9a8d79f1e0723b6cdc978f322 Mon Sep 17 00:00:00 2001 From: Chien Wong Date: Sat, 27 Apr 2024 16:19:45 +0800 Subject: [PATCH] tests: NAN: Check USD publish type Signed-off-by: Chien Wong --- tests/hwsim/test_nan_usd.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/hwsim/test_nan_usd.py b/tests/hwsim/test_nan_usd.py index 05cf1392c..356d33419 100644 --- a/tests/hwsim/test_nan_usd.py +++ b/tests/hwsim/test_nan_usd.py @@ -17,6 +17,16 @@ def check_nan_usd_capab(dev): if "USD" not in capa: raise HwsimSkip("NAN USD not supported") +def test_nan_usd_publish_invalid_param(dev): + """NAN USD Publish with invalid parameters""" + check_nan_usd_capab(dev[0]) + + # Both solicited and unsolicited disabled is invalid + cmd = "NAN_PUBLISH service_name=_test solicited=0 unsolicited=0" + id0 = dev[0].request(cmd) + if "FAIL" not in id0: + raise Exception("NAN_PUBLISH accepts both solicited=0 and unsolicited=0") + def test_nan_usd_publish(dev, apdev): """NAN USD Publish""" check_nan_usd_capab(dev[0])