tests: P2P_SERVICE_DEL
authorJouni Malinen <j@w1.fi>
Fri, 11 Apr 2014 21:16:38 +0000 (00:16 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 13 Apr 2014 07:26:52 +0000 (10:26 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_p2p_service.py

index ed9c145..70c3631 100644 (file)
@@ -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):