Commit Graph
13 Commits
Author SHA1 Message Date
Isaac ConnorandClaude Opus 5 a0626ed66f test: own the SockAddr that newSockAddr returns
Both "newSockAddr from resolved addr" sections called
zm::SockAddr::newSockAddr and dropped the pointer. It hands ownership to the
caller -- Socket deletes the ones it holds in its destructor -- so each run
leaked one: 48 bytes for the AF_INET case and 240 for the AF_UNIX one, the
288 bytes in 2 allocations AddressSanitizer has been reporting on every run
of the suite.

Held in a unique_ptr rather than deleted at the end of the section, because a
failing REQUIRE throws and would walk straight past a delete there.

With this the whole suite is clean under AddressSanitizer for the first time:
12171 assertions in 133 cases with no report of any kind, and the [notCI]
socket cases pass under it too, 66 assertions in 5 cases. Normal build
unchanged at 12171 assertions.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Y6FieTwEXuLhhR4e2yiax
2026-09-07 11:24:16 -04:00
Jash 691ab8ab66 test: handle IPv6 in getBoundPort, reserve the real socket path, drop the last hardcoded port 2026-08-18 06:22:31 +05:30
Jash ed0119b451 test: bind comms tests to ephemeral ports and unique socket paths 2026-08-16 15:25:37 +05:30
Peter Keresztes Schmidt 46155942c1 Misc: Rename namespace ZM to zm
We had a mixture of both spellings. Unify it according to our code-style.
2021-06-06 19:11:11 +02:00
Peter Keresztes Schmidt 298415fff3 Remove remaining usages of VLAs 2021-05-17 22:12:04 +02:00
Peter Keresztes Schmidt c2a7f7b593 tests/Box: Add unit tests 2021-05-16 16:42:58 +02:00
Peter Keresztes Schmidt 369fb68bb4 tests/comms: Disable tests which bind TCP sockets on CI runs
Those tests timeout on Cirrus. Disable them for now.
This introduces a new tag [notCI] with which tests can be marked which shouldn't be run during CI.
2021-04-11 02:46:56 +02:00
Peter Keresztes Schmidt f84d23817e tests/comms: Add tests for TcpInetClient/Server 2021-04-11 01:28:23 +02:00
Peter Keresztes Schmidt 25e6b70381 tests/comms: Add tests for ZM::UdpUnixSocket 2021-04-11 01:28:23 +02:00
Peter Keresztes Schmidt 17485f3547 tests/comms: Add tests for ZM::UdpInetSocket 2021-04-11 01:28:23 +02:00
Peter Keresztes Schmidt 45986c8ee2 tests/comms: Add some tests for SockAddrInet/Unix 2021-04-11 01:28:23 +02:00
Peter Keresztes Schmidt 5aa508bc74 tests/comms: Add read/write tests for ZM::Pipe 2021-04-11 01:28:23 +02:00
Peter Keresztes Schmidt a06d374292 tests/comms: Add some basic tests for ZM::Pipe 2021-04-11 01:28:23 +02:00