Skip to content

MC/DC: coverage campaign part 9 - #11595

Merged
philljj merged 50 commits into
wolfSSL:masterfrom
danielinux:mcdc-part9-coverage
Nov 5, 2026
Merged

philljj merged 50 commits into
wolfSSL:masterfrom
danielinux:mcdc-part9-coverage

Conversation

@danielinux

Copy link
Copy Markdown
Member

New decision-coverage drivers for the conditions upstream added since the part-8 anchor:

random.c (test_wc_DrbgReworkDecisionCoverage): the per-width Present/GetReseedCtr/ScheduleReseed arms driven through both DRBG widths with the type/pointer pairings poked on live instances, the Reseed_Nonce/Stir_Nonce NULL pairs, the InitRngNonce_ex2 perso clause tails, and the USE_FULL_MUTEX/NO_AUTO_LOCK init-flag arms. The SHA-512 DRBG is re-enabled after the SHA-256-width section so the process-wide DRBG state is restored.

aes.c (test_wc_AesReworkDecisionCoverage): the XTS unset-key guard (all four keylen/rounds rows), the GcmInit clause tail through wc_AesGcmEncryptInit (stream builds), the GcmSetIV clause tails (valid fixed part, oversized fixed part, NULL rng, NULL ivFixed, invalid size), the CTR leftover-keystream loop with left drained to zero, and the CFB two-block decrypt drain.

test_ssl_ext.c (test_wolfSSL_EnableRequireExtendedMasterSecret_ext): NULL pairs for the six EMS enable/require APIs, the client/server/ side-less/TLS-1.3 method branches of the re-arm checks, and the connect/accept handshake-state guard rows.

  • more test coverage

Copilot AI balanced review requested due to automatic review settings September 29, 2026 20:03
@danielinux danielinux self-assigned this Sep 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

gcc-arm-cortex-m3

  • FLASH: .text +36 B (+0.0%, 131,673 B / 262,144 B, total: 50% used)

gcc-arm-cortex-m4-baremetal

  • FLASH: .text +64 B (+0.1%, 73,463 B / 262,144 B, total: 28% used)

gcc-arm-cortex-m4-crypto-only

  • FLASH: .text +64 B (+0.0%, 181,651 B / 262,144 B, total: 69% used)

gcc-arm-cortex-m4-dtls13

  • FLASH: .text +64 B (+0.0%, 195,800 B / 1,048,576 B, total: 19% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .text -768 B (-0.1%, 800,548 B / 1,048,576 B, total: 76% used)

gcc-arm-cortex-m4-pq

  • FLASH: .text +64 B (+0.0%, 312,656 B / 1,048,576 B, total: 30% used)

gcc-arm-cortex-m4-tls13

  • FLASH: .text +64 B (+0.0%, 249,378 B / 262,144 B, total: 95% used)

gcc-arm-cortex-m7

  • FLASH: .text +64 B (+0.0%, 208,972 B / 262,144 B, total: 80% used)

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

@danielinux
danielinux force-pushed the mcdc-part9-coverage branch 2 times, most recently from 746b129 to fe5628d Compare October 8, 2026 07:19
@danielinux

Copy link
Copy Markdown
Member Author

jenkins retest this please

@danielinux

Copy link
Copy Markdown
Member Author

jenkins retest this please

@danielinux

Copy link
Copy Markdown
Member Author

jenkins retest this please
[failure in the post-test stage]

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #11595

Scan targets checked: wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): .wolfssl_known_macro_extras, tests/api/check-api-guards.py, tests/api/test_aes.h, tests/api/test_asn.h, tests/api/test_certman.h, tests/api/test_dh.h, tests/api/test_kdf.h, tests/api/test_mldsa.h, tests/api/test_pkcs7.h, tests/api/test_random.h, tests/api/test_session.h, tests/api/test_ssl_cert.h, tests/api/test_ssl_crl_ocsp.h, tests/api/test_ssl_ext.h, tests/api/test_tls.h, tests/api/test_tls13.h, tests/api/test_x509.h, tests/include.am, tests/unit-mcdc/mcdc_der_edit.h, tests/unit-mcdc/mcdc_fault_alloc.h and 3 more
Coverage: 6 of 44 in-scope changed file(s) opened by the reviewer; not opened: tests/api/test_aes.c, tests/api/test_asn.c, tests/api/test_certman.c, tests/api/test_dh.c, tests/api/test_kdf.c, tests/api/test_mldsa.c, tests/api/test_mlkem.c, tests/api/test_ocsp.c, tests/api/test_pkcs7.c, tests/api/test_session.c and 28 more

Findings: 10
10 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Review tier: Lite

Comment thread tests/unit-mcdc/test_dtls_whitebox.c Resolved
Comment thread tests/api/test_asn.c Resolved
Comment thread tests/api/test_random.c Resolved
Comment thread tests/unit-mcdc/test_tls_whitebox.c Resolved
Comment thread tests/unit-mcdc/test_tls_whitebox.c Resolved
Comment thread tests/api/test_tls.c Resolved
Comment thread tests/api/test_tls13.c Resolved
Comment thread tests/unit-mcdc/test_tls_whitebox.c Resolved
Comment thread tests/api/test_mlkem.c Resolved
Comment thread tests/unit-mcdc/test_dtls_whitebox.c Resolved
Comment thread tests/api/test_mldsa.c Resolved

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #11595

Scan targets checked: wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): .wolfssl_known_macro_extras, tests/api/check-api-guards.py, tests/api/test_aes.h, tests/api/test_asn.h, tests/api/test_certman.h, tests/api/test_dh.h, tests/api/test_kdf.h, tests/api/test_mldsa.h, tests/api/test_pkcs7.h, tests/api/test_random.h, tests/api/test_session.h, tests/api/test_ssl_cert.h, tests/api/test_ssl_crl_ocsp.h, tests/api/test_ssl_ext.h, tests/api/test_tls.h, tests/api/test_tls13.h, tests/api/test_x509.h, tests/include.am, tests/unit-mcdc/mcdc_der_edit.h, tests/unit-mcdc/mcdc_fault_alloc.h and 4 more
Coverage: 5 of 10 in-scope changed file(s) opened by the reviewer; not opened: tests/api/test_asn.c, tests/api/test_random.c, tests/api/test_tls.c, tests/unit-mcdc/test_dtls_whitebox.c, tests/unit-mcdc/test_random_fault_whitebox.c

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Review tier: Lite

Comment thread tests/api/test_mldsa.c Resolved

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #11595

Scan targets checked: wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): .wolfssl_known_macro_extras, tests/api/check-api-guards.py, tests/api/test_aes.h, tests/api/test_asn.h, tests/api/test_certman.h, tests/api/test_dh.h, tests/api/test_kdf.h, tests/api/test_mldsa.h, tests/api/test_pkcs7.h, tests/api/test_random.h, tests/api/test_session.h, tests/api/test_ssl_cert.h, tests/api/test_ssl_crl_ocsp.h, tests/api/test_ssl_ext.h, tests/api/test_tls.h, tests/api/test_tls13.h, tests/api/test_x509.h, tests/include.am, tests/unit-mcdc/mcdc_der_edit.h, tests/unit-mcdc/mcdc_fault_alloc.h and 4 more
Coverage: 1 of 1 in-scope changed file(s) opened by the reviewer

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

@wolfSSL-Fenrir-bot
wolfSSL-Fenrir-bot dismissed stale reviews from themself November 4, 2026 17:08

Fenrir's latest completed scan found no issues; clearing the prior automated change request.

@danielinux
danielinux requested a review from philljj November 4, 2026 19:23
Two regressions from the class D fix, both biting in configs where
the inner CID block and the DTLS 1.3 exporter sub-block compile
together (--enable-all class):

- test_tls.c: the dctx/dssl/cid decls landed mid-function when
  moved under the inner CID guard; move them to the top of the
  function under the full use condition (C90 mixed declarations).
- test_tls13.c: the exporter-suite TLS 1.3 phase freed its
  ctx/ssl objects without NULLing the pointers, and
  test_memio_setup() only creates a ctx for NULL slots - the
  DTLS 1.3 phase reused the dangling ctx and wolfSSL_new() ran
  on freed memory (SIGSEGV / glibc robust-mutex abort). NULL the
  pointers at the free site.

Verification: --enable-all with
CPPFLAGS=-DWOLFSSL_RSA_KEY_CHECK -DHAVE_EX_DATA_CLEANUP_HOOKS
builds clean and passes the full unit.test run.
@danielinux
danielinux requested a review from philljj November 5, 2026 09:00
@philljj

philljj commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

tests good with multi-test with all-gcc-c89, c89-clang-tidy, c89-sanitize, wolfssl-all, no-malloc, sanitize-tls13, etc

@philljj

philljj commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Retest this please.

(fips ready apple m1)

@philljj
philljj merged commit 375a3df into wolfSSL:master Nov 5, 2026
430 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.

5 participants