diff --git a/tests/hwsim/test_wpas_ctrl.py b/tests/hwsim/test_wpas_ctrl.py index c3617f638..b2144f71b 100644 --- a/tests/hwsim/test_wpas_ctrl.py +++ b/tests/hwsim/test_wpas_ctrl.py @@ -238,6 +238,10 @@ def test_wpas_ctrl_many_networks(dev, apdev): res = dev[0].request("LIST_NETWORKS LAST_ID=%d" % (id - 2)) if str(id) not in res: raise Exception("Last added network was not present when using LAST_ID") + # This command can take a very long time under valgrind testing on a low + # power CPU, so increase the command timeout significantly to avoid issues + # with the test case failing and following reset operation timing out. + dev[0].request("REMOVE_NETWORK all", timeout=60) def test_wpas_ctrl_dup_network(dev, apdev): """wpa_supplicant ctrl_iface DUP_NETWORK""" diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index cbba8c645..0298e29ac 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -75,9 +75,9 @@ class WpaSupplicant: self.remove_ifname() self.global_request("INTERFACE_REMOVE " + ifname) - def request(self, cmd): + def request(self, cmd, timeout=10): logger.debug(self.ifname + ": CTRL: " + cmd) - return self.ctrl.request(cmd) + return self.ctrl.request(cmd, timeout=timeout) def global_request(self, cmd): if self.global_iface is None: