summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c975c66)
dbus_p2p_go_neg_init, dbus_p2p_group_idle_timeout, and
dbus_p2p_group_termination_by_go could end up print a "DETACH failed"
exception as a warning from WpaSupplicant.__del__ for the dev1 instance
used within the TestDbusP2p class. This did not cause the test cases to
fail, but the output is a bit confusing, so clean this up be explicitly
closing the control interface monitor sockets and furthermore by
ignoring the "DETACH failed" exception within __del__.
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
if ev is None:
raise Exception("Group formation timed out")
self.sta_group_ev = ev
if ev is None:
raise Exception("Group formation timed out")
self.sta_group_ev = ev
+ dev1.close_monitor_global()
+ dev1.close_monitor_mon()
+ dev1 = None
def goNegotiationSuccess(self, properties):
logger.debug("goNegotiationSuccess: properties=%s" % str(properties))
def goNegotiationSuccess(self, properties):
logger.debug("goNegotiationSuccess: properties=%s" % str(properties))
properties['interface_object'])
group_p2p = dbus.Interface(g_if_obj, WPAS_DBUS_IFACE_P2PDEVICE)
group_p2p.Disconnect()
properties['interface_object'])
group_p2p = dbus.Interface(g_if_obj, WPAS_DBUS_IFACE_P2PDEVICE)
group_p2p.Disconnect()
- dev1 = WpaSupplicant('wlan1', '/tmp/wpas-wlan1')
+ dev1 = WpaSupplicant('wlan1', '/tmp/wpas-wlan1', monitor=False)
dev1.group_form_result(self.sta_group_ev)
dev1.remove_group()
dev1.group_form_result(self.sta_group_ev)
dev1.remove_group()
def groupFinished(self, properties):
logger.debug("groupFinished: " + str(properties))
def groupFinished(self, properties):
logger.debug("groupFinished: " + str(properties))
if ev is None:
raise Exception("Group formation timed out")
self.sta_group_ev = ev
if ev is None:
raise Exception("Group formation timed out")
self.sta_group_ev = ev
+ dev1.close_monitor_global()
+ dev1.close_monitor_mon()
+ dev1 = None
def goNegotiationSuccess(self, properties):
logger.debug("goNegotiationSuccess: properties=%s" % str(properties))
def goNegotiationSuccess(self, properties):
logger.debug("goNegotiationSuccess: properties=%s" % str(properties))
logger.debug("groupStarted: " + str(properties))
g_if_obj = bus.get_object(WPAS_DBUS_SERVICE,
properties['interface_object'])
logger.debug("groupStarted: " + str(properties))
g_if_obj = bus.get_object(WPAS_DBUS_SERVICE,
properties['interface_object'])
- dev1 = WpaSupplicant('wlan1', '/tmp/wpas-wlan1')
+ dev1 = WpaSupplicant('wlan1', '/tmp/wpas-wlan1', monitor=False)
dev1.group_form_result(self.sta_group_ev)
dev1.remove_group()
dev1.group_form_result(self.sta_group_ev)
dev1.remove_group()
if ev is None:
raise Exception("Group formation timed out")
self.sta_group_ev = ev
if ev is None:
raise Exception("Group formation timed out")
self.sta_group_ev = ev
+ dev1.close_monitor_global()
+ dev1.close_monitor_mon()
+ dev1 = None
def goNegotiationSuccess(self, properties):
logger.debug("goNegotiationSuccess: properties=%s" % str(properties))
def goNegotiationSuccess(self, properties):
logger.debug("goNegotiationSuccess: properties=%s" % str(properties))
self.group_started = True
g_if_obj = bus.get_object(WPAS_DBUS_SERVICE,
properties['interface_object'])
self.group_started = True
g_if_obj = bus.get_object(WPAS_DBUS_SERVICE,
properties['interface_object'])
- dev1 = WpaSupplicant('wlan1', '/tmp/wpas-wlan1')
+ dev1 = WpaSupplicant('wlan1', '/tmp/wpas-wlan1', monitor=False)
dev1.group_form_result(self.sta_group_ev)
ifaddr = dev1.group_request("STA-FIRST").splitlines()[0]
# Force disassociation with different reason code so that the
dev1.group_form_result(self.sta_group_ev)
ifaddr = dev1.group_request("STA-FIRST").splitlines()[0]
# Force disassociation with different reason code so that the
self.mon.detach()
except ConnectionRefusedError:
pass
self.mon.detach()
except ConnectionRefusedError:
pass
+ except Exception as e:
+ if str(e) == "DETACH failed":
+ pass
+ else:
+ raise
del self.mon
self.mon = None
del self.mon
self.mon = None
self.global_mon.detach()
except ConnectionRefusedError:
pass
self.global_mon.detach()
except ConnectionRefusedError:
pass
+ except Exception as e:
+ if str(e) == "DETACH failed":
+ pass
+ else:
+ raise
del self.global_mon
self.global_mon = None
del self.global_mon
self.global_mon = None