Commit b7b271c
connectd/tests: fix test_announce_and_connect_via_dns on macOS
Two issues caused this test to fail or produce BROKEN log messages on macOS:
1. macOS does not include 'localhost.localdomain' in /etc/hosts by default,
so the test's DNS-resolve step fails immediately. Skip with a clear
message if the hostname is not resolvable.
2. On macOS/BSD, AI_ADDRCONFIG is implemented by opening temporary probe
sockets to test IPv4/IPv6 connectivity. Those sockets are not registered
with the io framework, so dev_report_fds() flags them as unowned (BROKEN).
Guard AI_ADDRCONFIG with #ifndef __APPLE__ so Linux keeps the optimization
while macOS avoids the fd-leak.
Changelog-None
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 73825bc commit b7b271c
2 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1134 | 1134 | | |
1135 | 1135 | | |
1136 | 1136 | | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
1137 | 1142 | | |
| 1143 | + | |
| 1144 | + | |
1138 | 1145 | | |
1139 | 1146 | | |
1140 | 1147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
205 | 212 | | |
206 | 213 | | |
207 | 214 | | |
| |||
0 commit comments