test(scheduler-controller-msg-gap): real handler/applier unit tests (bug-765 G-6)
The Task 9 tests were marked [x] but were stub/absent. Convert the correctness-critical ones to real white-box tests, registered as meson tests under --suite scheduler (leaks-off per convention): - test_handlers.c (new) — #include ../src/handler.c; covers 9.2/9.3: each notify/dataset handler enqueues the correct op / skips NULL-empty / -EINVAL. Asserts the 5.6 fix (update_job -> UPDATE_JOB_FIELDS, not bulk UPDATE_JOB). - test_job_update.c — add 9.5 (real sched_update_existing_queue, replacing the former local stub); already covers 9.4 (job) and 9.7 (rusage). - meson.build — build + register all three scheduler test executables. Suite GREEN: sched_test 15/15, sched_job_update_test 10/10, sched_handlers_test 6/6; ASAN-clean. Honest remaining: 9.6 dequeue worker-resvals APPLY is PARTIAL (enqueue tested; apply is a dormant path, R-3); 9.8 is a documented compile-time absence check. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
080ff78a80
commit
276e26c37b
4 changed files with 270 additions and 7 deletions
|
|
@ -20,3 +20,21 @@ sched_job_update_test = executable('sched_job_update_test',
|
|||
include_directories:[incdir],
|
||||
dependencies: [scheduler_test_deps],
|
||||
install: false)
|
||||
|
||||
# White-box test for the notify/dataset enqueue handlers. It #includes
|
||||
# ../src/handler.c directly (enq_pend_update + the static handlers), so it is a
|
||||
# standalone TU with its own main() — built as a separate executable.
|
||||
sched_handlers_test = executable('sched_handlers_test',
|
||||
['test_handlers.c'],
|
||||
include_directories:[incdir],
|
||||
dependencies: [scheduler_test_deps],
|
||||
install: false)
|
||||
|
||||
# Register as meson tests so `meson test --suite scheduler` runs them all.
|
||||
# detect_leaks=0 matches the suite convention (fixtures are not torn down).
|
||||
test('scheduler test', scheduler_test, suite: 'scheduler',
|
||||
env: ['ASAN_OPTIONS=detect_leaks=0'])
|
||||
test('scheduler job-update test', sched_job_update_test, suite: 'scheduler',
|
||||
env: ['ASAN_OPTIONS=detect_leaks=0'])
|
||||
test('scheduler handlers test', sched_handlers_test, suite: 'scheduler',
|
||||
env: ['ASAN_OPTIONS=detect_leaks=0'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue