tests: Avoid exception in dbus_p2p_two_groups

Only run peerJoined() steps once to avoid trying to use GetAll() on an
already removed group and double-removal of a group. This did not make
the test case fail, but the exception is printed out in pretty confusing
way to stdout, so better get rid of it.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2015-08-03 18:35:35 +03:00 committed by Jouni Malinen
parent 0e7cde7619
commit 5a21764994

View file

@ -4438,6 +4438,7 @@ def test_dbus_p2p_two_groups(dev, apdev):
self.go = None
self.group1 = None
self.group2 = None
self.groups_removed = False
def __enter__(self):
gobject.timeout_add(1, self.run_test)
@ -4542,6 +4543,8 @@ def test_dbus_p2p_two_groups(dev, apdev):
def peerJoined(self, peer):
logger.debug("peerJoined: " + peer)
if self.groups_removed:
return
self.check_results()
dev2 = WpaSupplicant('wlan2', '/tmp/wpas-wlan2')
@ -4557,6 +4560,7 @@ def test_dbus_p2p_two_groups(dev, apdev):
group_p2p = dbus.Interface(self.g1_if_obj,
WPAS_DBUS_IFACE_P2PDEVICE)
group_p2p.Disconnect()
self.groups_removed = True
def check_results(self):
logger.info("Check results with two concurrent groups in operation")