Skip to content

Improve test coverage and fix typos#74

Merged
pavel-kirienko merged 3 commits intomainfrom
dev
Mar 7, 2026
Merged

Improve test coverage and fix typos#74
pavel-kirienko merged 3 commits intomainfrom
dev

Conversation

@pavel-kirienko
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@pavel-kirienko pavel-kirienko merged commit 7ad777f into main Mar 7, 2026
23 checks passed
@pavel-kirienko pavel-kirienko deleted the dev branch March 7, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants