From ea0e92eef571ba9770362695829f609860160e55 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 3 Sep 2013 12:13:25 +0300 Subject: [PATCH] tests: Check wpa_supplicant connection after reset 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 --- tests/hwsim/wpasupplicant.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index 6080b67e7..d1793d392 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -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")