pub struct ShellTestDescriptor {Show 13 fields
pub numa_nodes: u32,
pub llcs: u32,
pub cores: u32,
pub threads: u32,
pub memory_mib: u32,
pub wprof: bool,
pub extra_include_files: Vec<String>,
pub scheduler_name: String,
pub scheduler_kind: SchedulerKind,
pub wprof_args: Option<String>,
pub performance_mode: bool,
pub scheduler_enable_cmds: Vec<String>,
pub scheduler_disable_cmds: Vec<String>,
}Expand description
Wire-format descriptor exchanged between a test binary and
cargo ktstr shell --test <NAME> to let the shell VM mirror the
named #[ktstr_test]’s topology, scheduler, wprof config, and
performance mode.
scheduler_kind is a typed SchedulerKind discriminator so the
banner can hint at how to repro the scheduler (Discover/Path =
userspace binary at /bin/<n>; KernelBuiltin = no binary, runs
scheduler_enable_cmds before drop-to-shell and
scheduler_disable_cmds on shell exit; Eevdf = no setup needed).
scheduler_enable_cmds and scheduler_disable_cmds are extracted
from the crate::test_support::SchedulerSpec::KernelBuiltin
variant’s enable and disable slices respectively; the other
three variants emit empty vecs (no kernel-builtin shell ops to
invoke).
wprof_args: requires the wprof cargo feature. When the
feature is enabled and Some, replaces WprofConfig::args;
without the feature, the value is ignored by run_shell.
None means “use the default wprof args.”
performance_mode mirrors the test’s
#[ktstr_test(performance_mode)] attribute so the shell VM
reproduces vCPU pinning, hugepages, NUMA mbind, and SCHED_FIFO
promotion when the test requested them.
Fields§
§numa_nodes: u32§llcs: u32§cores: u32§threads: u32§memory_mib: u32§wprof: bool§extra_include_files: Vec<String>§scheduler_name: String§scheduler_kind: SchedulerKind§wprof_args: Option<String>Custom wprof CLI args (requires the wprof cargo feature).
When Some and the feature is enabled, the shell VM
overrides WprofConfig::args with the space-tokenised
value before booting.
performance_mode: boolMirrors KtstrTestEntry::performance_mode. The shell VM
forwards this to
crate::vmm::KtstrVmBuilder::performance_mode.
scheduler_enable_cmds: Vec<String>Shell commands invoked before drop-to-busybox when the test’s
scheduler is a
crate::test_support::SchedulerSpec::KernelBuiltin variant —
empty vec for the other three variants. Populated from the
variant’s enable slice.
scheduler_disable_cmds: Vec<String>Shell commands invoked on shell exit when the test’s scheduler
is a crate::test_support::SchedulerSpec::KernelBuiltin
variant — empty vec for the other three variants. Populated
from the variant’s disable slice.
Trait Implementations§
Source§impl Clone for ShellTestDescriptor
impl Clone for ShellTestDescriptor
Source§fn clone(&self) -> ShellTestDescriptor
fn clone(&self) -> ShellTestDescriptor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ShellTestDescriptor
impl Debug for ShellTestDescriptor
Source§impl Default for ShellTestDescriptor
impl Default for ShellTestDescriptor
Source§fn default() -> ShellTestDescriptor
fn default() -> ShellTestDescriptor
Source§impl<'de> Deserialize<'de> for ShellTestDescriptor
impl<'de> Deserialize<'de> for ShellTestDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ShellTestDescriptor
impl PartialEq for ShellTestDescriptor
Source§impl Serialize for ShellTestDescriptor
impl Serialize for ShellTestDescriptor
impl StructuralPartialEq for ShellTestDescriptor
Auto Trait Implementations§
impl Freeze for ShellTestDescriptor
impl RefUnwindSafe for ShellTestDescriptor
impl Send for ShellTestDescriptor
impl Sync for ShellTestDescriptor
impl Unpin for ShellTestDescriptor
impl UnwindSafe for ShellTestDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more