myxce/src/controller/testsuite
Rongsong Shen 89b85e1680 feat(config-upgrade-snapshot): gate primary serving and promotion on the activation fence
Wires task 6.1's upgrade_materialization_verify/upgrade_materialization_fenced
into ha_dispatch_gate's CTRL_PRIMARY branch (sequential block alongside,
not merged into, the existing config_serve_fenced check -- same
replication/read-only opcode allowlist, refuses state-changing ops
with -XCE_ERR_NOT_READY while fenced) and the promotion gate
(raft_cb_become_leader refuses to become CTRL_PRIMARY while fenced,
introduces no new WAL/log-completeness eligibility mechanism, never
self-terminates). Adds a 4-function self-triggering retry trampoline
(upgrade_materialization_retry_fn/_vtask_entry/_delaymgr_trampoline/
schedule_upgrade_materialization_retry) mirroring
config_activate_retry_fn's exact shape, hooked into
ha_cb_commit_advanced_stub alongside the existing config-byte retry.

Fixes a real bug caught on review: the fence had no production path
that could ever engage it from its zero-initialized default -- every
setter call site was gated on the fence already being set (closed
loop), making the new gate checks permanently dead code. Fixed with
two unconditional upgrade_materialization_verify() call sites:
persist.c's apply_committed_entry WAL_CONFIG_MARKER case (right after
persist_checkpoint_marker_triggered returns, regardless of its rc) and
myapp.c's boot sequence (right after config_activate_committed, for
Req 5.2 crash/restart resume). New test drives the fence through the
real production trigger (a forced -EBUSY checkpoint miss on a real
marker commit+apply), not a direct verify() call, proving the
end-to-end path actually works. Task 6.2 of 19.

Requirements: 3.1, 3.2, 3.3, 3.4, 4.3, 5.5
2026-07-25 04:58:37 +00:00
..
clean_failover_preservation.sh test(ha-term-safety): harness post-failover client probes target a live node (bug-854 workaround) 2026-06-23 04:12:32 +00:00
controller_test.c feat(config-upgrade-snapshot): materialize upgrade snapshot on config-marker apply 2026-07-24 16:28:57 +00:00
ctrlstatus_fmt.h feat(controller-status): render responderTime in cmd_ctrlstatus, log-comparable format (task 6.3) 2026-06-20 09:28:49 +00:00
snapdiff.c fix(raft-drive-async): resolve snapshot chunk-drop (bug-1386) and chunk misordering (bug-1389) 2026-07-03 02:40:12 +00:00
snapdiff.h fix(raft-drive-async): resolve snapshot chunk-drop (bug-1386) and chunk misordering (bug-1389) 2026-07-03 02:40:12 +00:00
snapverify.c fix(raft-drive-async): resolve snapshot chunk-drop (bug-1386) and chunk misordering (bug-1389) 2026-07-03 02:40:12 +00:00
snapverify.h fix(raft-drive-async): resolve snapshot chunk-drop (bug-1386) and chunk misordering (bug-1389) 2026-07-03 02:40:12 +00:00
test.c fix(schema): rename struct Data -> XceData to unshadow capnp builtin blob type 2026-07-22 09:22:04 +00:00
test_apply_committed_entry.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_apply_correctness_verification.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_apply_pump.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_apply_pump_integration.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_apply_reapply_idempotency.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_apply_seam.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_cluster_persist.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_coldstart_lsn0.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_commit_admission_pool.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_commit_barrier_reply.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_commit_barrier_rollout.c feat(controller): clusterconfig-schema-split task 3 — fix test fixtures for shrunk cluster_config_t 2026-07-21 04:52:25 +00:00
test_commit_durability.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_commit_engine.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_commit_resolve.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_config_repl.c feat(config-upgrade-snapshot): gate primary serving and promotion on the activation fence 2026-07-25 04:58:37 +00:00
test_convergence_verification.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ctrl_metrics.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ctrlstatus.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_demotion_convergence.c fix(controller): bug-1450/1451 offload delaymgr-inline blocking work to the slow lane 2026-07-19 08:14:00 +00:00
test_drive_async_config.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_e2e_capnp.c fix(schema): rename struct Data -> XceData to unshadow capnp builtin blob type 2026-07-22 09:22:04 +00:00
test_e2e_checkpoint.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_e2e_gc.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_e2e_hooks.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_e2e_wal.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_egress_filter.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_gc_retention.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_bootstrap.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_bootstrap_support.c feat(election-iomgr-refactor): remove old blocking election code (am_i_primary_quorum, vote_request_thread, bootstrap_config_if_needed) — task 5.3 2026-05-30 13:04:19 +00:00
test_ha_cluster.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_connection_reuse.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_core_safety.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_ctrlhello.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_dispatch_integration.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_durability.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_elect_ctx_lifecycle.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_election.c fix(controller): clamp committed_config_tag to own loaded config on promotion 2026-07-23 04:23:50 +00:00
test_ha_failover.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_failover_prevote.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_heartbeat_committed.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_liveness.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_partition.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_prevote.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_rdhup_integration.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_redirect.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_repl_push.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_role.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_role_lifecycle.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_start_election_async.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_startup.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_vep_teardown.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_vote_floor_heartbeat.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_vote_gate.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_ha_vote_send.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_hooks.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_job_array_apiserver_push.c fix(schema): rename struct Data -> XceData to unshadow capnp builtin blob type 2026-07-22 09:22:04 +00:00
test_job_array_apply.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_job_array_fence.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_job_array_replay_fence.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_job_array_sched_push.c fix(schema): rename struct Data -> XceData to unshadow capnp builtin blob type 2026-07-22 09:22:04 +00:00
test_join_redirect.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_p1_integration.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_p2_integration.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_p3_hardening.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_p3_manual_failover.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_persist_checkpoint.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_persist_hooks.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_persist_recovery.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_persist_repl.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_persist_schema.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_persist_snapshot_entities.c feat(config-upgrade-snapshot): decode host/queue admin-state frames on checkpoint load 2026-07-24 14:08:12 +00:00
test_persist_truncate.c fix(controller): bug-1452 fix commit_engine_fini/persist_stop teardown race 2026-07-19 09:27:50 +00:00
test_persist_types.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_persist_wal.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_repl_apply.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_repl_catchup.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_repl_majority.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_repl_unit.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_replay_apply_seam.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_slowlane.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_snapdiff.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_snapverify.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_term_safety_adapter.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_upgrade_snapshot_apply.c feat(config-upgrade-snapshot): materialize upgrade snapshot on config-marker apply 2026-07-24 16:28:57 +00:00
test_upgrade_snapshot_restore.c feat(config-upgrade-snapshot): restore host admin-state frame safely (create-if-missing) 2026-07-24 12:48:28 +00:00
test_walcompare.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_waldump.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
test_worker_join.c fix(controller-tests): make Unity test-file attribution and counters consistent suite-wide 2026-07-17 14:49:12 +00:00
walcompare.c feat(walcompare): add per-member checkpoint-floor awareness (raft-ha-core-safety 5.10a / ha-entity-snapshots 7.1) 2026-07-02 02:59:08 +00:00
walcompare.h feat(walcompare): add per-member checkpoint-floor awareness (raft-ha-core-safety 5.10a / ha-entity-snapshots 7.1) 2026-07-02 02:59:08 +00:00
waldump.c test(job-array-single-wal-record): large-array HA soak scenario 2026-07-16 04:43:55 +00:00
waldump.h test(ha-term-safety): cross-member walcompare divergence tool (task 5.3) 2026-06-22 13:05:23 +00:00