Skip to content

DUnitX migration: full suite parity, keep DUnit for comparison#97

Open
omonien wants to merge 15 commits into
MHumm:developmentfrom
omonien:pr-dunitx-migration
Open

DUnitX migration: full suite parity, keep DUnit for comparison#97
omonien wants to merge 15 commits into
MHumm:developmentfrom
omonien:pr-dunitx-migration

Conversation

@omonien

@omonien omonien commented Jul 23, 2026

Copy link
Copy Markdown

For Markus — theme: test infrastructure (prerequisite)

This is the foundation for the cleanup work: make DUnitX a complete, parity-proven runner for the whole suite, while keeping classic DUnit as a comparison baseline.

No production crypto algorithms are changed here.

Why this matters for you

Before larger AEAD / cipher-mode work (and before reviewing a split of PR #90), we need a single trustworthy test signal. Today both runners exist; DUnitX was incomplete and had DUnitX-only failures from dual-stack quirks. After this PR:

  • DUnitX covers the same unit set as DUnit (incl. CCM, ZIP helper, AEAD shared test data)
  • Fail-set parity: same failures on both runners (no DUnitX-only reds)
  • Classic DUnit stays until you explicitly decide to remove it later

What changed (high level)

Area Change
DECDUnitXTestSuite Full unit list; DPR aligned with DUnitX practice (explicit fixtures, UseRTTI := False, console/CI exit codes, TestInsight path)
Dual-stack tests Registration gaps fixed; ISO10126 / BCrypt no longer redeclare published methods in a way that double-discovers under DUnitX
Docs Migration plan + parity log; roadmap section on DUnitX
readme.md Notes DUnitX as preferred runner

Parity (Delphi 13 / Win32, at time of work)

Suite Run Failed
DUnit Console 1436 12
DUnitX Debug 1473 12
  • 0 DUnitX-only failures after fixes
  • The same 12 shared failures were pre-existing product/test debt (Keccak vectors + GCM stream chunked) — fixed in separate PRs
  • Residual +37 DUnitX case count from hash-leaf TestIsPasswordHash redeclares — accepted (count noise only, no fail impact)

Out of scope (intentionally later)

  • Removing the classic DUnit project
  • Switching asserts from Check* / DUnitCompatibility to native Assert.*
  • Fixing Keccak / GCM product bugs (own PRs)

Suggested review focus

  1. DPR / project wiring for DUnitX — acceptable for CI and local runs?
  2. Test-only API hooks (NormalizeAddPaddingResult, ExpectedIsPasswordHash) — OK as dual-stack bridge?
  3. Decision to keep DUnit temporarily — documented; removal is a separate future PR

Risk

Low for library users (tests + docs). Medium for maintainers who still open the DUnit project (still valid).

Dependency note

This branch includes Docs/Cleanup-Roadmap.md (updated for the DUnitX phase). If PR #96 (roadmap only) is already merged, GitHub should auto-merge the common docs with little conflict; otherwise this PR alone is self-contained.

Test plan

  • Build Source\DEC60.dproj Debug Win32
  • Build + run DECDUnitTestSuite Console Win32
  • Build + run DECDUnitXTestSuite Debug Win32
  • Spot-check: CCM and ZIP fixtures present under DUnitX

Details: Docs/plans/2026-07-22-dunitx-migration.md, Docs/plans/dunitx-parity-log.md

omonien added 15 commits July 23, 2026 13:16
Record that AEAD architecture must be separated from ChaCha features,
and that a full DUnit to DUnitX migration is the prerequisite before
that work.
Inventory dual suites, sense-check existing tests, and record that
DECDUnitTestSuite stays until a later removal PR.
Compare DECDUnitXTestSuite.dpr to VSoft D12/D13 templates; fold runner
hardening into Task 3 of the migration plan.
Record Win32 Console DUnit (1425 run, 12 failures) and Debug DUnitX
(1457 found, 15 failures) baselines, coverage gap (CCM/ZIP), and
environment notes for the DUnitX migration.
Use non-published virtual hooks (NormalizeAddPaddingResult, ExpectedIsPasswordHash) so ISO10126 and BCrypt keep correct assertions without DUnitX double-discovery.
They only affect DUnitX case counts, not fail-set parity; no cleanup needed.
Define TESTINSIGHT for the TestInsight build config, and reject ISO 10126
padding results whose length does not match the expected pattern before
masking random pad bytes.
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.

1 participant