fix(scheduler): apply a mid-replay CONFIG_PUSH to the sim limit plugin (bug-1964)
Cause: live applies every pushed config through sched_init_config(), whose plugin_config_update() runs each plugin's config_hook (the limit plugin builds its limits there). The simulator seeded the limit plugin only at bootstrap (sim_bootstrap_limit_plugin()); the core's CONFIG_PUSH event loaded groups, resources and queues but never told the plugins, so a limit added during a replay never existed in sim. Fix: one shared fan-out, plugin_config_update_core(core, config), which live's plugin_config_update() now delegates to. The core's CONFIG_PUSH calls a driver-registered xce_core_config_cb_t after loading groups (live order), keeping the core free of plugin.c; the simulator registers the fan-out in sim_bootstrap_limit_plugin(). limit_update_config() reads the honestly-typed plugin->core instead of casting plugin->sched, so the hook is safe on the sim core; the hand-built plugin fixtures in test_limit_plugin.c/test_repl_limit_table.c now set plugin->core as plugin_register() does. test_sim_limit_config_push_parity.c covers it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2cd02cdc8c
commit
3224e90683
13 changed files with 452 additions and 7 deletions
|
|
@ -129,6 +129,9 @@ static void fixture_init(xce_scheduler_t* sched, xce_sched_plugin_t* plugin)
|
|||
|
||||
memset(plugin, 0, sizeof(*plugin));
|
||||
plugin->sched = sched;
|
||||
/* as plugin_register() sets it; limit_update_config() reads it
|
||||
* (bug-1964) */
|
||||
plugin->core = &(sched->core);
|
||||
|
||||
rc = limit_init(plugin);
|
||||
TEST_ASSERT_EQUAL_INT(0, rc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue