feat(scheduler-core): add picker configuration fields (task 1.3)

Adds xce_scheduler_t.job_pick_plugin (global picker name), and on
xce_sched_queue_t: project_name + job_pick_plugin (per-queue override,
NULL = inherit global). Adds xce_sched_project_t.priority (scaffolding
only, no quota logic). sched_set_default_job_pick_plugin() is added but
not yet wired into sched_init() -- task 2.4 owns that, alongside
replacing the hardcoded "xce_sched_fcfs" literal.

Requirements: 2.1, 2.2, 2.3, 2.4
This commit is contained in:
Rongsong Shen 2026-08-03 05:45:53 +00:00
parent 4d8d72142e
commit 0d63a789a1
6 changed files with 398 additions and 2 deletions

View file

@ -81,6 +81,18 @@ sched_picker_registration_test = executable('sched_picker_registration_test',
dependencies: [scheduler_test_deps],
install: false)
# White-box test for the picker configuration fields added to
# xce_scheduler_t/xce_sched_queue_t/xce_sched_project_t (scheduler-core
# spec, task 1.3). It #includes ../src/schedobj.c directly (same white-box
# pattern as sched_job_update_test) so it exercises the real
# make_sched_queue/make_sched_project/sched_set_default_job_pick_plugin,
# not a re-implementation of any of them.
sched_picker_config_fields_test = executable('sched_picker_config_fields_test',
['test_picker_config_fields.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',
@ -97,3 +109,5 @@ test('scheduler picker iface test', sched_picker_iface_test, suite: 'scheduler',
env: ['ASAN_OPTIONS=detect_leaks=0'])
test('scheduler picker registration test', sched_picker_registration_test, suite: 'scheduler',
env: ['ASAN_OPTIONS=detect_leaks=0'])
test('scheduler picker config fields test', sched_picker_config_fields_test, suite: 'scheduler',
env: ['ASAN_OPTIONS=detect_leaks=0'])