Improve test coverage - #47
Merged
Merged
Conversation
- extract th_addrinfo (getaddrinfo/freeaddrinfo mirrored 1:1) into th_address, resolved once by th_listener before opening the acceptor - add TH_ERR_CATEGORY_EAI for getaddrinfo's EAI_* codes, distinct from errno; EAI_SYSTEM still maps to TH_ERR_SYSTEM(errno) - split th_acceptor_ops.open into socket/setsockopt/set_nonblocking/ bind/listen/close, one op per syscall, so tests can fake each step - add TH_EADDRINUSE
- th_test_allocator_fail_after(n) makes the Nth alloc/realloc call return NULL, self-resetting once triggered; also reset at the start of every test case so a leftover countdown can't leak into the next - add th_dir_mgr_add coverage looping fail_after over every step, verifying the eventual success is actually visible via a get
Covers tracking on init/deinit, count across multiple conns, async_wait's fire-on-any-destroy-while-armed/once-only behavior, and cancel_all - using a fake th_conn_observable, no real socket needed.
Cover a cookie-name starting with a separator, tabs before the value, and a control character inside a quoted value.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve test coverage of: