From 7b3863dc16f7e5c045cbfd5d3769781e4745df10 Mon Sep 17 00:00:00 2001 From: nicholasyang Date: Thu, 10 Oct 2024 15:15:28 +0800 Subject: [PATCH] add more debug logging --- test/features/steps/behave_agent.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/features/steps/behave_agent.py b/test/features/steps/behave_agent.py index 578a9bb34..d6d6a2fa3 100755 --- a/test/features/steps/behave_agent.py +++ b/test/features/steps/behave_agent.py @@ -59,7 +59,10 @@ def write(self, __b) -> int: def call(host: str, port: int, cmdline: str, user: typing.Optional[str] = None): - print(f'behave.call({host}, {port}') + subprocess.run(['ip', 'addr']) + subprocess.run(['cat', '/etc/resolv.conf']) + subprocess.run(['cat', '/etc/hosts']) + print(f'behave.call({host}, {port})') family, type, proto, _, sockaddr = socket.getaddrinfo(host, port, type=socket.SOCK_STREAM)[0] with socket.socket(family, type, proto) as s: s.connect(sockaddr)