test: enable feature_bind_extra on macOS and BSD

`feature_bind_extra` checks `-bind` and `-whitebind` by comparing the node's listening sockets with the expected addresses.
Add `get_bind_addrs` support for macOS, FreeBSD, NetBSD, and OpenBSD using `lsof`, and switch the test to the POSIX platform guard so it runs there too.
On FreeBSD, pass `-Di` to avoid device-cache warnings on stderr that the functional test runner treats as failures.

Co-authored-by: willcl-ark <will8clark@gmail.com>
Co-authored-by: fanquake <fanquake@gmail.com>
This commit is contained in:
Lőrinc
2026-01-11 20:32:57 +01:00
parent 74e7518088
commit 7236a05503
2 changed files with 27 additions and 9 deletions

View File

@@ -32,8 +32,7 @@ class BindExtraTest(BitcoinTestFramework):
self.num_nodes = 3
def skip_test_if_missing_module(self):
# Due to OS-specific network stats queries, we only run on Linux.
self.skip_if_platform_not_linux()
self.skip_if_platform_not_posix()
def setup_network(self):
loopback_ipv4 = addr_to_hex("127.0.0.1")