Expand description
Curated canned scenarios for common scheduler test patterns.
Each function takes a Ctx and returns Result<AssertResult>.
These are thin wrappers over existing scenario implementations,
providing better names in a single discoverable namespace.
§Categories
- Basic: steady-state cgroups with no dynamic ops.
- Cpuset: cpuset assignment and mid-run mutation.
- Dynamic: cgroup add/remove during a running workload.
- Affinity: per-worker CPU affinity patterns.
- Stress: host/cgroup contention and mixed workload types.
- Nested: workers in nested sub-cgroups.
§Example
use ktstr::prelude::*;
#[ktstr_test(llcs = 2, cores = 4, threads = 1)]
fn test_steady(ctx: &Ctx) -> Result<AssertResult> {
scenarios::steady(ctx)
}Functions§
- affinity_
change - Two cgroups with worker affinities randomized mid-run.
- affinity_
pinned - Two cgroups with workers pinned to a 2-CPU subset.
- cgroup_
add - Two cgroups initially, then one or two more added mid-run.
- cgroup_
remove - Four cgroups initially, then the second half removed mid-run.
- cpuset_
apply - Two cgroups start without cpusets, then get disjoint cpusets mid-run.
- cpuset_
clear - Two cgroups start with disjoint cpusets, then cpusets are cleared mid-run.
- cpuset_
resize - Two cgroups with cpusets that shrink then grow.
- host_
contention - Host workers competing with cgroup workers for CPU time.
- mixed_
workloads - Heavy + bursty + IO cgroups.
- nested_
steady - Workers in nested sub-cgroups.
- nested_
task_ move - Move tasks between nested cgroups.
- oversubscribed
- Two cgroups with 32 mixed workers each (oversubscribed).
- steady
- Two cgroups, no cpusets, equal CPU-spin load.
- steady_
llc - Two cgroups with LLC-aligned cpusets.