diff --git a/tests/hwsim/test_eap_proto.py b/tests/hwsim/test_eap_proto.py index 7aeaf968c..fad33bba5 100644 --- a/tests/hwsim/test_eap_proto.py +++ b/tests/hwsim/test_eap_proto.py @@ -145,6 +145,9 @@ def start_radius_server(eap_handler): else: logger.error("Unexpected event in pyrad server main loop") + for fd in self.authfds + self.acctfds: + fd.close() + srv = TestServer(dict=pyrad.dictionary.Dictionary("dictionary.radius"), authport=18138, acctport=18139) srv.hosts["127.0.0.1"] = pyrad.server.RemoteHost("127.0.0.1", diff --git a/tests/hwsim/test_radius.py b/tests/hwsim/test_radius.py index 6e825f0f5..dbefaf551 100644 --- a/tests/hwsim/test_radius.py +++ b/tests/hwsim/test_radius.py @@ -1079,6 +1079,9 @@ def test_radius_protocol(dev, apdev): else: logger.error("Unexpected event in pyrad server main loop") + for fd in self.authfds + self.acctfds: + fd.close() + srv = TestServer(dict=pyrad.dictionary.Dictionary("dictionary.radius"), authport=18138, acctport=18139) srv.hosts["127.0.0.1"] = pyrad.server.RemoteHost("127.0.0.1", @@ -1193,6 +1196,9 @@ def start_radius_psk_server(psk, invalid_code=False, acct_interim_interval=0, else: logger.error("Unexpected event in pyrad server main loop") + for fd in self.authfds + self.acctfds: + fd.close() + srv = TestServer(dict=pyrad.dictionary.Dictionary("dictionary.radius"), authport=18138, acctport=18139) srv.hosts["127.0.0.1"] = pyrad.server.RemoteHost("127.0.0.1", @@ -1471,6 +1477,9 @@ def test_ap_vlan_wpa2_psk_radius_required(dev, apdev): else: logger.error("Unexpected event in pyrad server main loop") + for fd in self.authfds + self.acctfds: + fd.close() + srv = TestServer(dict=pyrad.dictionary.Dictionary("dictionary.radius"), authport=18138, acctport=18139) srv.hosts["127.0.0.1"] = pyrad.server.RemoteHost("127.0.0.1",