Stop breaking TestUtil.cpp on Windows, dangit! (#11529)

* Stop breaking TestUtil.cpp on Windows, dangit!

* Update test/TestUtil.cpp

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Thomas Göttgens
2026-08-17 17:04:31 +00:00
committed by GitHub
co-authored by coderabbitai[bot]
parent 5dffd22584
commit ef2be877a5
+6
View File
@@ -40,6 +40,11 @@
//
// Listening sockets only: an outbound connection is a different (and louder) problem, and gethostby*
// opens transient sockets that would make an any-socket check flap.
// Linux-only: this check reads /proc; MinGW-w64 has no readlink() for fd links.
// Linux CI covers the check; native Windows uses a no-op.
#ifdef _WIN32
static void assertNoListeningSockets() {}
#else
static void assertNoListeningSockets()
{
// Socket fds appear as "socket:[inode]"; a listening TCP row in /proc/self/net carries st 0A.
@@ -102,6 +107,7 @@ static void assertNoListeningSockets()
exit(EXIT_FAILURE);
}
#endif
#endif
#if ARCH_PORTDUINO
static bool environmentBaselined = false;