merge-fix: reconcile Rongsong WAL-fact replay tests with bug-1509 B3; lib test leak-detection convention

Rongsong's new test_wal_job_{start,rusage,ckpt}_fact.c assert a replayed RUN job's state equals exactly JOB_STAT_RUN, but our bug-1509 B3 marks restarted RUN jobs UNKWN+TRANSIENT in-memory (worker connectivity unknown until resend). Reconcile the 7 restart-replay assertions to expect RUN|UNKWN|TRANSIENT — same reconciliation 8858afed did for test_dispatch_commit.c.

lib meson.build: add ASAN_OPTIONS=detect_leaks=0 to the libxce test, matching the suite-wide convention (controller/worker/scheduler all set it; fixtures are not torn down). Rongsong's new test_xcealloc.c leaves test-only allocations unfreed (no public free API for alloc/host_alloc), which aborts the test under default leak detection.
This commit is contained in:
lei.chen 2026-08-31 14:57:49 +00:00
parent 3dbb96d4e6
commit 9657349c4a
4 changed files with 32 additions and 12 deletions

View file

@ -482,7 +482,10 @@ static void test_wjc_restart_replay_recovers_ckptinfo(void)
job_t* j = wjc_find_job(74006);
TEST_ASSERT_NOT_NULL_MESSAGE(j,
"restart replay must construct the job via WAL_JOB_SUBMIT");
TEST_ASSERT_EQUAL_UINT32(JOB_STAT_RUN, j->job.state);
/* bug-1509 B3: after restart a RUN job is marked UNKWN+TRANSIENT
* in-memory (worker connectivity unknown) until worker resend. */
TEST_ASSERT_EQUAL_UINT32(JOB_STAT_RUN | JOB_STAT_UNKWN | JOB_STAT_TRANSIENT,
j->job.state);
wjc_assert_ckptinfo_matches(j, wire_ckptinfo);
wjc_teardown();
@ -644,9 +647,11 @@ static void test_wjc_real_on_job_ckpt_survives_restart(void)
unlock(c2.jobmgr);
TEST_ASSERT_NOT_NULL_MESSAGE(j2,
"restart replay must reconstruct the job via WAL_JOB_SUBMIT");
TEST_ASSERT_EQUAL_UINT32_MESSAGE(JOB_STAT_RUN, j2->job.state,
"restart replay must recover the job's state, unchanged by the "
"real on_job_ckpt() call");
TEST_ASSERT_EQUAL_UINT32_MESSAGE(JOB_STAT_RUN | JOB_STAT_UNKWN | JOB_STAT_TRANSIENT,
j2->job.state,
"restart replay must recover the job as RUNNING (with bug-1509 "
"B3's UNKWN+TRANSIENT marking) from the WAL_JOB_CKPT fact "
"appended by the real on_job_ckpt() call");
/* bug-1691: restart replay must recover the worker/scheduler-
* reported ckptinfo string -- the audit's exact confirmed root

View file

@ -701,7 +701,10 @@ static void test_wru_restart_replay_recovers_runusage(void)
job_t* j = wru_find_job(73006);
TEST_ASSERT_NOT_NULL_MESSAGE(j,
"restart replay must construct the job via WAL_JOB_SUBMIT");
TEST_ASSERT_EQUAL_UINT32(JOB_STAT_RUN, j->job.state);
/* bug-1509 B3: after restart a RUN job is marked UNKWN+TRANSIENT
* in-memory (worker connectivity unknown) until worker resend. */
TEST_ASSERT_EQUAL_UINT32(JOB_STAT_RUN | JOB_STAT_UNKWN | JOB_STAT_TRANSIENT,
j->job.state);
wru_assert_runusage_matches(j->job.run_usage);
wru_teardown();
@ -875,7 +878,10 @@ static void test_wru_real_hook_appends_and_survives_restart(void)
unlock(c2.jobmgr);
TEST_ASSERT_NOT_NULL_MESSAGE(j2,
"restart replay must reconstruct the job via WAL_JOB_SUBMIT");
TEST_ASSERT_EQUAL_UINT32(JOB_STAT_RUN, j2->job.state);
/* bug-1509 B3: after restart a RUN job is marked UNKWN+TRANSIENT
* in-memory (worker connectivity unknown) until worker resend. */
TEST_ASSERT_EQUAL_UINT32(JOB_STAT_RUN | JOB_STAT_UNKWN | JOB_STAT_TRANSIENT,
j2->job.state);
/* bug-1690: restart replay must recover the client-reported
* run_usage, not just state -- the audit's exact confirmed root

View file

@ -757,7 +757,10 @@ static void test_wjs_restart_replay_recovers_pidinfo_but_not_start_time(void)
job_t* j = wjs_find_job(72005);
TEST_ASSERT_NOT_NULL_MESSAGE(j,
"restart replay must construct the job via WAL_JOB_SUBMIT");
TEST_ASSERT_EQUAL_UINT32(JOB_STAT_RUN, j->job.state);
/* bug-1509 B3: after restart a RUN job is marked UNKWN+TRANSIENT
* in-memory (worker connectivity unknown) until worker resend. */
TEST_ASSERT_EQUAL_UINT32(JOB_STAT_RUN | JOB_STAT_UNKWN | JOB_STAT_TRANSIENT,
j->job.state);
TEST_ASSERT_EQUAL_UINT64_MESSAGE(0, (uint64_t)j->job.start_time,
"bug-1697: with no WAL_JOB_DISPATCH fact anywhere in this log, "
"restart replay must leave start_time at 0, NOT adopt "
@ -922,7 +925,10 @@ test_wjs_restart_replay_recovers_dispatch_start_time_and_started_pidinfo(void)
job_t* j = wjs_find_job(72008);
TEST_ASSERT_NOT_NULL_MESSAGE(j,
"restart replay must construct the job via WAL_JOB_SUBMIT");
TEST_ASSERT_EQUAL_UINT32(JOB_STAT_RUN, j->job.state);
/* bug-1509 B3: after restart a RUN job is marked UNKWN+TRANSIENT
* in-memory (worker connectivity unknown) until worker resend. */
TEST_ASSERT_EQUAL_UINT32(JOB_STAT_RUN | JOB_STAT_UNKWN | JOB_STAT_TRANSIENT,
j->job.state);
TEST_ASSERT_EQUAL_UINT64_MESSAGE(dispatch_start_time,
(uint64_t)j->job.start_time,
"bug-1697: restart replay of a dispatch-then-started job must "
@ -1092,9 +1098,11 @@ static void test_wjs_real_on_job_start_survives_restart(void)
unlock(c2.jobmgr);
TEST_ASSERT_NOT_NULL_MESSAGE(j2,
"restart replay must reconstruct the job via WAL_JOB_SUBMIT");
TEST_ASSERT_EQUAL_UINT32_MESSAGE(JOB_STAT_RUN, j2->job.state,
"restart replay must recover the job as RUNNING from the "
"WAL_JOB_START fact appended by the real on_job_start() call");
TEST_ASSERT_EQUAL_UINT32_MESSAGE(JOB_STAT_RUN | JOB_STAT_UNKWN | JOB_STAT_TRANSIENT,
j2->job.state,
"restart replay must recover the job as RUNNING (with bug-1509 "
"B3's UNKWN+TRANSIENT marking) from the WAL_JOB_START fact "
"appended by the real on_job_start() call");
/* bug-1687: restart replay must recover not just STATE but the
* worker-reported pidinfo (mirrors bug-1678's own acceptance

View file

@ -207,4 +207,5 @@ libxce_test = executable('xcelib_test',
c_args: ['-DXCE_TESTING'],
install: true)
test('libxce test', libxce_test, timeout: 120)
test('libxce test', libxce_test, timeout: 120,
env: ['ASAN_OPTIONS=detect_leaks=0']) # suite convention — fixtures not torn down