[PATCH 4/7] tests: Clear scan cache on reset

Ilan Peer ilan.peer at intel.com
Thu Jul 30 02:00:03 EDT 2015


From: Andrei Otcheretianski <andrei.otcheretianski at intel.com>

Scan cache is kept in the kernel between different tests and may affect
the tests. Clear scan cache in reset().

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 tests/hwsim/wpasupplicant.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py
index d2e82e9..6c4d598 100644
--- a/tests/hwsim/wpasupplicant.py
+++ b/tests/hwsim/wpasupplicant.py
@@ -163,11 +163,11 @@ class WpaSupplicant:
             except subprocess.CalledProcessError, e:
                 logger.info("ifconfig failed: " + str(e.returncode))
                 logger.info(e.output)
-        if iter > 0:
-            # 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()
+
+        self.dump_monitor()
+        self.flush_scan_cache()
+        self.request("FLUSH")
+        self.dump_monitor()
 
         if not self.ping():
             logger.info("No PING response from " + self.ifname + " after reset")
-- 
1.9.1



More information about the HostAP mailing list