Skip to content

Added new clusters of unit tests, removed dead branches#119

Merged
dgarske merged 2 commits into
wolfSSL:masterfrom
danielinux:unit-test-cases
May 13, 2026
Merged

Added new clusters of unit tests, removed dead branches#119
dgarske merged 2 commits into
wolfSSL:masterfrom
danielinux:unit-test-cases

Conversation

@danielinux
Copy link
Copy Markdown
Member

@danielinux danielinux commented May 13, 2026

  Coverage on src/wolfip.c (multicast build, make cov-multicast)

  ┌───────────┬─────────────────────┬─────────────────────┬────────────────────────────────────────────┐
  │  Metric   │    origin/master    │        PR 119       │                     Δ                      │
  ├───────────┼─────────────────────┼─────────────────────┼────────────────────────────────────────────┤
  │ Lines     │ 89.6% (5062 / 5650) │ 94.9% (5356 / 5644) │ +5.3 pp · +294 covered                     │
  ├───────────┼─────────────────────┼─────────────────────┼────────────────────────────────────────────┤
  │ Branches  │ 77.1% (3190 / 4140) │ 85.1% (3520 / 4134) │ +8.0 pp · +330 covered, +6 removed as dead │
  ├───────────┼─────────────────────┼─────────────────────┼────────────────────────────────────────────┤
  │ Functions │ 100% (238 / 238)    │ 100% (238 / 238)    │ —                                          │
  └───────────┴─────────────────────┴─────────────────────┴────────────────────────────────────────────┘

@danielinux danielinux self-assigned this May 13, 2026
Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #119

Scan targets checked: wolfip-bugs, wolfip-src

No new issues found in the changed files. ✅

Copy link
Copy Markdown
Contributor

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

Note

Copilot was unable to run its full agentic suite in this review.

This PR increases branch coverage (notably for src/wolfip.c in multicast builds) by adding several new unit-test clusters and by removing a few defensive branches that are believed to be unreachable (“dead”).

Changes:

  • Remove selected defensive checks in DNS parsing / callback code paths in src/wolfip.c.
  • Add new unit-test suites targeting socket API arms, DHCP/DNS/IP/ARP receive-path edges, and various small edge-case helpers.
  • Wire new tests into the unit test runner and build system, and add a cov-multicast convenience target.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/wolfip.c Removes some DNS-related guard branches to reduce dead code and align with added coverage.
src/test/unit/unit_tests_socket_api_arms.c Adds TCP/RAW/PACKET arm tests for socket API entry points.
src/test/unit/unit_tests_misc_edges.c Adds targeted edge-case tests for small helpers and defensive branches.
src/test/unit/unit_tests_ip_arp_recv.c Adds IP/ARP receive-path branch tests (forwarding, broadcasts, options, ARP validation).
src/test/unit/unit_tests_dns_edges.c Adds DNS callback and name parsing edge-case tests.
src/test/unit/unit_tests_dhcp_edges.c Adds DHCP parsing/timer edge-case tests.
src/test/unit/unit.c Registers the large set of newly added tests in the test suite.
Makefile Adds new unit-test sources and introduces cov-multicast target.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/wolfip.c
Comment thread src/wolfip.c
Comment thread src/test/unit/unit_tests_dns_edges.c Outdated
Comment thread src/test/unit/unit_tests_dns_edges.c
Comment thread src/test/unit/unit_tests_dns_edges.c Outdated
@dgarske dgarske merged commit 8d2d948 into wolfSSL:master May 13, 2026
35 of 36 checks passed
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.

4 participants