This allows control interface issues to be caught in a bit more readable
way in the debug logs. In addition, dump pending monitor socket
information more frequently and within each test case in the log files
to make the output clearer and less likely to go over the socket buffer
limit.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
start = datetime.now()
for d in dev:
try:
+ d.dump_monitor()
+ if not d.ping():
+ raise Exception("PING failed for {}".format(d.ifname))
+ if not d.global_ping():
+ raise Exception("Global PING failed for {}".format(d.ifname))
d.request("NOTE TEST-START " + name)
except Exception, e:
logger.info("Failed to issue TEST-START before " + name + " for " + d.ifname)
result = "FAIL"
for d in dev:
try:
+ d.dump_monitor()
d.request("NOTE TEST-STOP " + name)
except Exception, e:
logger.info("Failed to issue TEST-STOP after {} for {}".format(name, d.ifname))
result = "FAIL"
try:
wpas = WpaSupplicant("wlan5", "/tmp/wpas-wlan5")
+ d.dump_monitor()
rename_log(args.logdir, 'log5', name, wpas)
if not args.no_reset:
wpas.remove_ifname()
self.request(cmd)
else:
ifname = self.ifname or self.global_iface
- logger.debug(ifname + ": CTRL: " + cmd)
+ logger.debug(ifname + ": CTRL(global): " + cmd)
return self.global_ctrl.request(cmd)
def group_request(self, cmd):
def ping(self):
return "PONG" in self.request("PING")
+ def global_ping(self):
+ return "PONG" in self.global_request("PING")
+
def reset(self):
+ self.dump_monitor()
res = self.request("FLUSH")
if not "OK" in res:
logger.info("FLUSH to " + self.ifname + " failed: " + res)