From 78185978ed5bf853eb35a958dac46bef7159ce47 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 14 Oct 2015 18:34:26 +0300 Subject: [PATCH] tests: Fix regulatory domain reset in FST test case failure cases send_iface_detach_request() can fail and that resulted in skipping a call to restore_reg_domain() and leaving unexpected country configuration for following test cases. This could result in failures, e.g., in this sequence: fst_proto wpas_mesh_open_5ghz Fix this by ignoring exceptions from send_iface_detach_request() and continuing to restore regulatory domain. Signed-off-by: Jouni Malinen --- tests/hwsim/fst_module_aux.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/fst_module_aux.py b/tests/hwsim/fst_module_aux.py index 286fa858b..605abfe93 100644 --- a/tests/hwsim/fst_module_aux.py +++ b/tests/hwsim/fst_module_aux.py @@ -621,7 +621,10 @@ class FstAP (FstDevice): hostapd.""" if len(self.fst_group) != 0: self.remove_all_sessions() - self.send_iface_detach_request(self.iface) + try: + self.send_iface_detach_request(self.iface) + except Exception, e: + logger.info(str(e)) self.reg_ctrl.stop() del self.global_instance self.global_instance = None