From 56147bc779ea6dc1c15f4c650d52c1d00ae7dbcb Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 12 Apr 2014 00:16:38 +0300 Subject: [PATCH] tests: P2P_SERVICE_DEL Signed-off-by: Jouni Malinen --- tests/hwsim/test_p2p_service.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/hwsim/test_p2p_service.py b/tests/hwsim/test_p2p_service.py index ed9c14589..70c3631a1 100644 --- a/tests/hwsim/test_p2p_service.py +++ b/tests/hwsim/test_p2p_service.py @@ -71,6 +71,19 @@ def run_sd(dev, dst, query, exp_query=None, fragment=False, query2=None): raise Exception("Service discovery timed out") if addr0 in ev: break + + dev[0].p2p_stop_find() + dev[1].p2p_stop_find() + + if "OK" not in dev[0].request("P2P_SERVICE_DEL upnp 10 uuid:6859dede-8574-59ab-9332-123456789012::upnp:rootdevice"): + raise Exception("Failed to delete a UPnP service") + if "FAIL" not in dev[0].request("P2P_SERVICE_DEL upnp 10 uuid:6859dede-8574-59ab-9332-123456789012::upnp:rootdevice"): + raise Exception("Unexpected deletion success for UPnP service") + if "OK" not in dev[0].request("P2P_SERVICE_DEL bonjour 0b5f6166706f766572746370c00c000c01"): + raise Exception("Failed to delete a Bonjour service") + if "FAIL" not in dev[0].request("P2P_SERVICE_DEL bonjour 0b5f6166706f766572746370c00c000c01"): + raise Exception("Unexpected deletion success for Bonjour service") + return ev def test_p2p_service_discovery(dev):