More verification paths in unit tests#89
Merged
Conversation
Member
danielinux
commented
Mar 27, 2026
- Added important verification paths in unit tests
- Added more tests to cover argument checks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands wolfIP’s unit test suite to cover additional verification/guard paths and edge cases across TCP, routing, poll scheduling, and DNS/DHCP handling.
Changes:
- Added targeted TCP option parsing tests (truncation/invalid lengths, mixed options, unknown kinds, SACK block clamping).
- Added tests for poll behavior (draining all expired timers, enforcing poll budget), accept() half-open cloning/SYN-ACK queueing, and several TCP persist/zero-window/RTO guard paths.
- Added DNS/DHCP tests for resend-query argument guards, malformed compressed-name abort behavior, and DHCP renewing/rebinding ACK processing.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/unit/unit_tests_tcp_flow.c | Adds coverage for tcp_parse_options() edge cases (truncation, mixed options, SACK limits). |
| src/test/unit/unit_tests_tcp_ack.c | Adds routing mask==0 exact-match case and non-ethernet TTL-exceeded filter behavior test. |
| src/test/unit/unit_tests_proto.c | Adds tests for TCP persist/zero-window probes/RTO paths and various guard-path helpers. |
| src/test/unit/unit_tests_dns_dhcp.c | Adds DNS resend failure-mode tests, DHCP renewing/rebinding ACK poll tests, and malformed compressed-name abort coverage. |
| src/test/unit/unit_tests_api.c | Adds tests for wolfIP_poll() timer draining, poll budget enforcement, filter socket-event defaults, and accept() half-open cloning behavior. |
| src/test/unit/unit.c | Registers the newly added tests into the suite. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gasbytes
approved these changes
Mar 27, 2026
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.