tests: Run dump_monitor() again if scan was pending

In addition to running the FLUSH command again, the pending monitor
interface events need be cleared in case the driver was running a scan
when reset() is called. This avoids issues, e.g., with discovery_dev_id
failing due to an unexpected P2P-DEVICE-FOUND event that was generated
by the pending scan operation that had not yet complete when the first
dump_monitor() call in reset() happened.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-01-14 23:37:15 +02:00
parent efc64886b8
commit b21df6e779

View file

@ -124,6 +124,7 @@ class WpaSupplicant:
# The ongoing scan could have discovered BSSes or P2P peers
logger.info("Run FLUSH again since scan was in progress")
self.request("FLUSH")
self.dump_monitor()
if not self.ping():
logger.info("No PING response from " + self.ifname + " after reset")