From e7d454bb76d1fd88f976f561f0e7fe9df5453ed0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 24 Jun 2016 18:38:36 +0300 Subject: [PATCH] tests: D-Bus DeviceFoundProperties signal Signed-off-by: Jouni Malinen --- tests/hwsim/test_dbus.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py index 416dd27..11d8f8d 100644 --- a/tests/hwsim/test_dbus.py +++ b/tests/hwsim/test_dbus.py @@ -2727,6 +2727,7 @@ def test_dbus_p2p_discovery(dev, apdev): TestDbus.__init__(self, bus) self.found = False self.found2 = False + self.found_prop = False self.lost = False self.find_stopped = False @@ -2735,6 +2736,8 @@ def test_dbus_p2p_discovery(dev, apdev): gobject.timeout_add(15000, self.timeout) self.add_signal(self.deviceFound, WPAS_DBUS_IFACE_P2PDEVICE, "DeviceFound") + self.add_signal(self.deviceFoundProperties, + WPAS_DBUS_IFACE_P2PDEVICE, "DeviceFoundProperties") self.add_signal(self.deviceLost, WPAS_DBUS_IFACE_P2PDEVICE, "DeviceLost") self.add_signal(self.provisionDiscoveryResponseEnterPin, @@ -2802,6 +2805,12 @@ def test_dbus_p2p_discovery(dev, apdev): raise Exception("Unexpected error message for invalid RejectPeer(): " + str(e)) self.loop.quit() + def deviceFoundProperties(self, path, properties): + logger.debug("deviceFoundProperties: path=%s" % path) + logger.debug("peer properties: " + str(properties)) + if properties['DeviceAddress'] == a1: + self.found_prop = True + def provisionDiscoveryResponseEnterPin(self, peer_object): logger.debug("provisionDiscoveryResponseEnterPin - peer=%s" % peer_object) p2p.Flush() -- 2.1.4