diff options
author | David Vašek <david.vasek@nic.cz> | 2024-12-09 17:50:31 +0100 |
---|---|---|
committer | David Vašek <david.vasek@nic.cz> | 2024-12-25 23:50:34 +0100 |
commit | df1a49f4cabbf3cf67a1359006ad44dcf0172226 (patch) | |
tree | 0ea583adfdf0c50001edec2f55867fb6b1d8faff | |
parent | libngtcp2: update embedded libngtcp2 to v1.10.0 (diff) | |
download | knot-df1a49f4cabbf3cf67a1359006ad44dcf0172226.tar.xz knot-df1a49f4cabbf3cf67a1359006ad44dcf0172226.zip |
tests-extra: fix Knot server starting when it listens on a socket
-rw-r--r-- | tests-extra/tools/dnstest/server.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests-extra/tools/dnstest/server.py b/tests-extra/tools/dnstest/server.py index 04b46401b..c8ee35566 100644 --- a/tests-extra/tools/dnstest/server.py +++ b/tests-extra/tools/dnstest/server.py @@ -232,9 +232,11 @@ class Server(object): def _check_socket(self, proto, port): if self.addr.startswith("/"): + ux_socket = True param = "" iface = self.addr else: + ux_socket = False param = "-i" if ipaddress.ip_address(self.addr).version == 4: iface = "4%s@%s:%i" % (proto, self.addr, port) @@ -254,7 +256,7 @@ class Server(object): pids = list(set(pids)) # Check for successful bind. - if len(pids) == 1 and str(self.proc.pid) in pids: + if (ux_socket or len(pids) == 1) and str(self.proc.pid) in pids: return True time.sleep(2) |