mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-04 03:18:10 +10:00
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:
co-authored by
coderabbitai[bot]
parent
5dffd22584
commit
ef2be877a5
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user