Improve test coverage and fix typos#74
Merged
pavel-kirienko merged 3 commits intomainfrom Mar 7, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves test coverage for the libudpard library by adding new test functions across multiple test files, and fixes two typos in source-level comments in udpard.c and updates the docstring for udpard_rx_port_new_stateless in udpard.h to better describe the stateless acceptance behavior.
Changes:
- New intrusive tests for TX path edge cases (capacity failure, spool OOM rollback, refcount retention, deadline comparison, transfer alloc OOM, eject stall, sharing branches)
- New intrusive tests for RX path edge cases (session OOM, session retirement, stateless extent/offset handling, fragment OOM, slot update paths, session update failures, port-free with incomplete transfers, fragment tree update paths)
- New end-to-end tests for stateless single-frame and multi-frame first-frame handling; existing e2e tests updated to use larger payloads and stronger assertions; guard tests extended with additional invalid-argument cases; typo fixes in comments
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/src/test_intrusive_tx.c |
Adds 7 new TX-side tests covering OOM, capacity, eject stall, refcount, and sharing branches |
tests/src/test_intrusive_rx.c |
Adds shared rx_mem_fixture_t helper and 9 new RX-side tests covering OOM, session lifecycle, stateless mode, slot update, and port teardown |
tests/src/test_intrusive_misc.c |
Adds make_fragment helper and test_misc_helpers covering internal utilities and fragment tree teardown |
tests/src/test_intrusive_guards.c |
Extends guard tests with null-eject vtable, bad payload memory, tx_poll/tx_free null guards, rx_port_ctor guards, and additional rx_port_push null checks |
tests/src/test_e2e_edge.cpp |
Adds 3 stateless tests (single-frame, truncation, rejection), enlarges existing payload sizes, strengthens multiframe assertion |
tests/src/test_e2e_api.cpp |
Enlarges payload size and strengthens assertion to confirm multiframe transfer |
libudpard/udpard.h |
Updates udpard_rx_port_new_stateless docstring to reflect extent-prefix acceptance |
libudpard/udpard.c |
Fixes two comment typos ("node"→"note", "of OOM"→"on OOM") |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.