From 70352fda038545f46641dc75c89b3aa6523b39dd Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 26 Jun 2026 16:37:46 +0100 Subject: [PATCH] qa: Strip prefix length from NetBSD `ifconfig` output Modern NetBSD `ifconfig` prints interface addresses in CIDR notation (e.g. `inet 127.0.0.1/8`), unlike the other supported platforms which print the netmask as a separate field. The trailing prefix length breaks functional tests that expect a plain IP address. This change is a no-op on other platforms. --- test/functional/test_framework/netutil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/test_framework/netutil.py b/test/functional/test_framework/netutil.py index 034d0ff3d34..2cbcc7a0b4a 100644 --- a/test/functional/test_framework/netutil.py +++ b/test/functional/test_framework/netutil.py @@ -149,7 +149,7 @@ def all_interfaces(): return [ (m["iface"].encode(), ip) for m in re.finditer(r"(?m)^(?P\S+):(?P[^\n]*(?:\n[ \t]+[^\n]*)*)", output) - for ip in re.findall(r"inet (\S+)", m["block"]) + for ip in re.findall(r"inet ([^\s/]+)", m["block"]) ] else: raise NotImplementedError(f"all_interfaces is not supported on {sys.platform}")