]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Check wpa_supplicant connection after reset
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 3 Sep 2013 09:13:25 +0000 (12:13 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 3 Sep 2013 09:13:25 +0000 (12:13 +0300)
Some test runs have resulted in wpa_supplicant being unresponsive or
very slow on the control interface. Check for that type of issues as
part of the reset sequence that is done between each test case.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

tests/hwsim/wpasupplicant.py

index 6080b67e7004f44d97a7260bb533c3676b08190b..d1793d3928f637e4a0938d3ecd7c11fd5b733cd9 100644 (file)
@@ -51,11 +51,15 @@ class WpaSupplicant:
         return "PONG" in self.request("PING")
 
     def reset(self):
-        self.request("FLUSH")
+        res = self.request("FLUSH")
+        if not "OK" in res:
+            logger.info("FLUSH to " + self.ifname + " failed: " + res)
         self.request("SET ignore_old_scan_res 0")
         self.request("P2P_SET per_sta_psk 0")
         self.group_ifname = None
         self.dump_monitor()
+        if not self.ping():
+            logger.info("No PING response from " + self.ifname + " after reset")
 
     def add_network(self):
         id = self.request("ADD_NETWORK")