myxce/src/controller/testsuite
lei.chen 8858afed3a fix(merge): restore bug-1490 job control + p2-hang flusher fix + B3 test reconciliation
Merge follow-up fixes found during comprehensive unit-test + live-cluster
verification of the scheduler-framework merge:

- apiserver/backend/clib.go (ControlJob): Rongsong's clib.go had reverted
  our bug-1490 fix — ctrl.action must be the capnp JobControl union
  DISCRIMINANT (0=siginfo,1=ckptoption), not the models.JOB_* constant
  (1/2/3/8), or every kill/stop/resume fails -EINVAL. Restored
  ctrl.action = C.int(jobCtrlDiscriminant(action)); verified live (job
  kill RUN->EXIT).

- controller/persist.c (fsync_worker): the merged bug-1563 no-progress
  backoff used the PRE-FLUSH `pending` snapshot, so a no-op flush (another
  path advanced durable_lsn to tip mid-flush) also slept wal_sync_ms and
  raced commit_engine_fini in teardown, hanging the p2_integration suite
  ~60% (bug-1515). Re-evaluate the level AFTER the flush (pending_after)
  so only a genuine sustained fdatasync failure backoffs. 20/20 clean p2
  runs (was 3/5 hang). Also carries the bug-1509 B3 RUN->UNKWN marking in
  persist_recover.

- scheduler/worker testsuite meson.build: add unity_dep parent includedir
  (unity.pc Cflags only add -I${includedir}/unity, so <unity/unity.h> was
  unresolvable) — same fix as src/lib/meson.build.

- test_handlers.c: re-point notify.data.dispatchfail after the first
  sched_handle_notify NULLs it on success (code=0 branch was -EINVAL).

- test_controller_connector.c: give the rejoin-success fixtures a valid
  worker_list pointer (my bug-1509 resend_job_status deref was NULL-
  crashing).

- test_wal_job_dispatch_fact.c / test_dispatch_commit.c: Rongsong's
  WAL_JOB_DISPATCH replay tests asserted JOB_STAT_RUN after persist_recover,
  conflicting with bug-1509 B3 (RUN->UNKWN on restart). Assert JOB_IS_RUN
  (base RUN recovered, incl. bug-1678 allocs) + UNKWN flag instead.

All suites green: controller 1145/0, scheduler 57/57, worker 15/15,
lib 303/0, apiserver CGO build ok.
2026-08-26 10:52:35 +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
configcompare.c feat(config-upgrade-snapshot): add configcompare tool, extend snapverify (task 8.4) 2026-07-25 09:06:24 +00:00
configcompare.h feat(config-upgrade-snapshot): add configcompare tool, extend snapverify (task 8.4) 2026-07-25 09:06:24 +00:00
controller_test.c feat(scheduler-dispatch-commit): handle_jobdispatch no longer duplicates dispatch-outcome reporting (task 4.1) 2026-08-23 18:18:34 +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
resval_typeresolve.c feat(resource-value-verification): wire resolver into resupdate, add -t flag (task 2.1) 2026-08-17 23:56:18 +00:00
resval_typeresolve.h feat(resource-value-verification): wire resolver into resupdate, add -t flag (task 2.1) 2026-08-17 23:56:18 +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 feat(config-upgrade-snapshot): add configcompare tool, extend snapverify (task 8.4) 2026-07-25 09:06:24 +00:00
snapverify.h feat(config-upgrade-snapshot): add configcompare tool, extend snapverify (task 8.4) 2026-07-25 09:06:24 +00:00
test.c merge: sync Rongsong's scheduler-framework into chatbot 2026-08-25 12:33:16 +00:00
test_apply_committed_entry.c fix(controller): job start_time/finish_time/run_time never set by apply-pump 2026-08-20 04:24:44 +00:00
test_apply_correctness_verification.c fix(controller): close 6 data-safety races + apply-pump O(N^2) regression + boot TOCTOU 2026-08-16 10:20:02 +00:00
test_apply_pump.c merge: sync Rongsong's scheduler-framework into chatbot 2026-08-25 12:33:16 +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_bug857_regression.c feat(config-upgrade-snapshot): add bug-857 regression test, correct design.md (task 8.5) 2026-07-25 10:44:14 +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 test(scheduler-dispatch-commit): fix last stale pinned assertion, full regression clean (task 5.4, final) 2026-08-23 21:39:01 +00:00
test_commit_barrier_rollout.c feat(config-upgrade-snapshot): remove restart/replay fallback, marker-trigger materializes alone 2026-07-25 05:37:27 +00:00
test_commit_durability.c fix(controller): persist_flush now fires durable-advance callback (bug-1564) 2026-08-17 10:20:24 +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 fix(controller): trim config versions by ns mtime; unique test tmpdir 2026-08-01 03:34:55 +00:00
test_configcompare.c feat(config-upgrade-snapshot): add configcompare tool, extend snapverify (task 8.4) 2026-07-25 09:06:24 +00:00
test_convergence_verification.c fix(ha): close permanent catch-up wedge from duplicated replication-target formula (bug-1478) 2026-07-28 09:53:20 +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_dispatch_commit.c fix(merge): restore bug-1490 job control + p2-hang flusher fix + B3 test reconciliation 2026-08-26 10:52:35 +00:00
test_dispatch_fail_retry.c test(scheduler-dispatch-commit): retryable and bounded-retry dispatch failure e2e coverage (task 5.2) 2026-08-23 20:14:18 +00:00
test_dispatch_fail_terminal.c feat(scheduler-dispatch-commit): controller resolves terminal dispatch failures to EXIT (task 3.2) 2026-08-23 16:36:39 +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(controller): stop SIGSEGV in WalCatchupEntry capnp encode (bug-1505) 2026-08-07 11:09:27 +00:00
test_e2e_checkpoint.c fix(controller): close 6 data-safety races + apply-pump O(N^2) regression + boot TOCTOU 2026-08-16 10:20:02 +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 test(raft-adapter-conformance): WAL catch-up reject reply-construction regression lock 2026-07-29 16:11:47 +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): close 6 data-safety races + apply-pump O(N^2) regression + boot TOCTOU 2026-08-16 10:20:02 +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(ha): free liveness poll ctx on failed/skipped delaymgr schedule (bug-1483) 2026-08-02 04:36:37 +00:00
test_ha_rdhup_integration.c fix(ha): close standby election-freeze (bug-1562) + flusher retry storm (bug-1563) 2026-08-17 06:35:06 +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(ha): close permanent quorum-loss deadlock on log-conflicted standby (bug-1479) 2026-07-29 04:11:32 +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 test(raft-adapter-conformance): PreVote post-connect failure routing + fast-quorum coverage 2026-07-29 14:38:36 +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_job_dispatch.c feat(scheduler-dispatch-commit): add controller dispatch-failure classification (task 1.1) 2026-08-23 06:36:51 +00:00
test_job_dispatch_fail_count.c feat(scheduler-dispatch-commit): add dispatch-fail retry counter to job_t (task 1.3) 2026-08-23 07:44:22 +00:00
test_jobdispatch_no_double_notify.c test(scheduler-dispatch-commit): terminal dispatch failure e2e coverage (task 5.3) 2026-08-23 20:47:15 +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): close 6 data-safety races + apply-pump O(N^2) regression + boot TOCTOU 2026-08-16 10:20:02 +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): persist dispatch-time resource allocation into WAL_JOB_DISPATCH (bug-1678, gitea #43) 2026-08-25 03:12:49 +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(repl): harden standby slot allocation against WAL-retention guard clobber (bug-1474) 2026-07-26 04:11:27 +00:00
test_replay_apply_seam.c fix(controller): mark RUN jobs unknown on worker loss and restart (bug-1509 P2) 2026-08-06 05:57:59 +00:00
test_resval_typeresolve.c feat(resource-value-verification): extract resupdate type-resolution logic (task 1.1) 2026-08-17 23:03:57 +00:00
test_sched_admin_dispatch.c fix(controller): admission-gate OPCode_schedAdmin's blocking wait (Req 5 AC 10) 2026-08-19 11:00:49 +00:00
test_sched_worker_change.c fix(controller): sched_worker_change() use-after-free on worker disconnect (bug-1578) 2026-08-18 08:15:37 +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 feat(config-upgrade-snapshot): add configcompare tool, extend snapverify (task 8.4) 2026-07-25 09:06:24 +00:00
test_term_adoption_vectors.c test(ha): add term-adoption regression tests for heartbeat/WAL-NACK vectors (bug-1484) 2026-08-02 04:36:46 +00:00
test_term_safety_adapter.c fix(ha): close standby election-freeze (bug-1562) + flusher retry storm (bug-1563) 2026-08-17 06:35:06 +00:00
test_upgrade_snapshot_apply.c test(config-upgrade-snapshot): fault-inject crash/restart + leadership change (task 8.7) 2026-07-25 18:20:43 +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_wal_job_dispatch_fact.c fix(merge): restore bug-1490 job control + p2-hang flusher fix + B3 test reconciliation 2026-08-26 10:52:35 +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(waldump): decode WAL_CONFIG_MARKER, distinguish trimmed gaps from real loss 2026-07-31 09:05:22 +00:00
test_worker_join.c fix(controller,xceadmin): fix zero-slot scheduling block, misleading resval logs, byte-unit display 2026-08-13 08:12:09 +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 fix(waldump): decode WAL_CONFIG_MARKER, distinguish trimmed gaps from real loss 2026-07-31 09:05:22 +00:00
waldump.h fix(waldump): decode WAL_CONFIG_MARKER, distinguish trimmed gaps from real loss 2026-07-31 09:05:22 +00:00