From b21df6e779979d334cc7e5aee878afc3d9213d1a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 14 Jan 2014 23:37:15 +0200 Subject: [PATCH] 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 --- tests/hwsim/wpasupplicant.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index 79aee2655..082704b74 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -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")