feat(scheduler-sim-discrete-clock): remove the simulator speed argument and shadow copy (task 3.1)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
eb5f339541
commit
aa2bb6d090
32 changed files with 72 additions and 129 deletions
|
|
@ -27,8 +27,8 @@
|
|||
* this file exercises the same real sched_sim_driver_run() end-to-end,
|
||||
* forked-child, real-stdout-capture technique. Discrete-simulation
|
||||
* determinism note (research.md's own key finding, load-bearing for every
|
||||
* test below): `child_run_repl_and_exit()` sets args.sim_speed = 0, which
|
||||
* sim_set_virtual_clock() (sim.c) stores as core.speed_num == 0; with
|
||||
* test below): simulation mode always runs the core clock frozen --
|
||||
* sim_set_virtual_clock() (sim.c) stores core.speed_num == 0; with
|
||||
* speed_num == 0, xce_core_now()'s (core_clock.c) `elapsed * num / den` term
|
||||
* is always exactly zero, so xce_core_now() returns EXACTLY the raw
|
||||
* nanosecond `ts` value most recently passed to sim_advance_virtual_clock()
|
||||
|
|
@ -634,9 +634,10 @@ static char* read_whole_file(const char* path)
|
|||
/* child_run_repl_and_exit / run_repl_fixture_and_capture - the same fork/
|
||||
* freopen/waitpid/capture shape test_repl_event_echo.c's own pair
|
||||
* establishes: run a scripted command sequence to completion against a real
|
||||
* sched_sim_driver_run(), capturing real stdout. args.sim_speed = 0 below is
|
||||
* this file's own load-bearing determinism note (see header comment) -- it
|
||||
* is what makes xce_core_now() return EXACTLY each event's own `ts`. */
|
||||
* sched_sim_driver_run(), capturing real stdout. The simulator's frozen
|
||||
* clock is this file's own load-bearing determinism note (see header
|
||||
* comment) -- it is what makes xce_core_now() return EXACTLY each event's
|
||||
* own `ts`. */
|
||||
static void child_run_repl_and_exit(const char* replay_path,
|
||||
const char* script_path,
|
||||
const char* capture_path)
|
||||
|
|
@ -655,7 +656,6 @@ static void child_run_repl_and_exit(const char* replay_path,
|
|||
memset(&args, 0, sizeof(args));
|
||||
args.replay_path = replay_path;
|
||||
args.sim_start_ts = SCHED_SIM_START_TS_LATEST;
|
||||
args.sim_speed = 0;
|
||||
args.interactive = true;
|
||||
|
||||
(void)sched_sim_driver_run(&sim, &args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue