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:
Rongsong Shen 2026-09-29 05:19:34 +00:00
parent eb5f339541
commit aa2bb6d090
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
32 changed files with 72 additions and 129 deletions

View file

@ -13,11 +13,10 @@
* Testing Strategy: Unit (SimClock) and Integration (replay loop)): in
* simulation mode the logical clock moves only at the start snapshot, at
* each recorded event and at each recorded session, is set exactly (never
* clamped, even backwards), and never drifts with real time. Every clock
* test passes a non-zero speed through the still-present
* sched_sim_args_t.sim_speed (DISCRETE_CLOCK_RED_SPEED) to prove the
* simulator no longer reads it; task 3.1 removes that field and these
* assignments while keeping the pinned-clock assertions.
* clamped, even backwards), and never drifts with real time. (Task 2.1
* proved RED by passing a non-zero speed through the simulator's speed
* argument; task 3.1 removed that argument, and these tests keep asserting
* the pinned clock.)
*
* White-box #include of the same simulator TU set test_sim_record_output.c
* uses, with its link-satisfying stubs and stand-in picker; the stand-in
@ -465,10 +464,6 @@ static void test_no_warning_when_option_absent(void)
/* chosen value first, so the recorded start snapshot's ts is exact. */
/* ---------------------------------------------------------------------- */
/* Task 2.1 RED: a non-zero speed through the still-present simulator
* argument. The simulator must ignore it; removed with the field in 3.1. */
#define DISCRETE_CLOCK_RED_SPEED 7
#define SNAP_TS 1000000000000ULL /* start snapshot, 1000 s */
#define JOB_A 4101ULL
#define JOB_B 4102ULL
@ -622,7 +617,6 @@ static void sim_args_init(sched_sim_args_t* args, 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 = DISCRETE_CLOCK_RED_SPEED;
}
/* Runs a batch replay with `sim` as the observed core. */