test(raft-ha-core-safety): harness infrastructure + payload-loss smoke-RED (task 1.4)

New test_ha_core_safety.c with deterministic gate/probe seams (no sleeps,
drain-before-fini per bug-1224): payload-controllable WAL writer, on-disk
(term,pcrc,len) readback probe, walcompare observer, apply-gap + kill/
election injection for phases 2.3/4.1/5.1. Smoke-RED (Expected 64 Was 0)
proves the payload-blind (term,lsn)-only guard at persist.c:822 drops a
corrective full-payload write at a committed LSN. 5 tests/1 RED/4 seam
PASS, no ASAN errors.
This commit is contained in:
Rongsong Shen 2026-06-27 09:49:51 +00:00
parent 9e55f09274
commit dc50924833
4 changed files with 415 additions and 1 deletions

View file

@ -145,6 +145,7 @@ controller_unit_test_src = [
'testsuite/test_commit_admission_pool.c',
'testsuite/test_ha_vep_teardown.c',
'testsuite/test_ha_dispatch_integration.c',
'testsuite/test_ha_core_safety.c',
'testsuite/test_waldump.c',
'testsuite/waldump.c',
'testsuite/test_walcompare.c',