tests: Clear pending monitor events before starting scan
The wait_event() call for scan completion could have processed a previously received event from a prior scan instead of the newly started one. This could result in flush_scan_cache() assuming there are still results in the cache even though the scan request to clear the cache had not even be started yet. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
4131ba5c55
commit
043a29ecc4
1 changed files with 2 additions and 0 deletions
|
@ -1050,6 +1050,8 @@ class WpaSupplicant:
|
|||
|
||||
def scan(self, type=None, freq=None, no_wait=False, only_new=False,
|
||||
passive=False):
|
||||
if not no_wait:
|
||||
self.dump_monitor()
|
||||
if type:
|
||||
cmd = "SCAN TYPE=" + type
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue