VerifierVmResult

Struct VerifierVmResult 

Source
pub struct VerifierVmResult {
    pub stats: Vec<ProgStats>,
    pub scheduler_log: String,
    pub scheduler_stdout: String,
    pub scheduler_stderr: String,
    pub attach: AttachOutcome,
    pub dispatched: bool,
    pub scheduler_exited: bool,
    pub guest_exit_code: Option<i32>,
    pub timed_out: bool,
    pub crash_message: Option<String>,
    pub dilation: Option<f64>,
}
Expand description

Result of collecting verifier output from a VM run.

Fields§

§stats: Vec<ProgStats>

Per-program verifier statistics from host-side memory introspection (bpf_prog_aux->verified_insns).

§scheduler_log: String

Scheduler log (merged stdout+stderr) from the VM’s teardown dump_sched_output (the /tmp/sched.log file bracketed by the SCHED_OUTPUT_START/END markers). Contains libbpf’s verifier instruction traces when BPF load fails. Present only when the run reached a dump path (teardown / scheduler-exit / boot-failure); a watchdog timeout kills the VM before any dump, leaving this empty — Self::scheduler_stdout / Self::scheduler_stderr are the live-streamed fallbacks that survive that case.

§scheduler_stdout: String

The scheduler child’s stdout. Normally concatenated directly from the live MSG_TYPE_SCHED_STDOUT frames shipped per pipe read. When the guest detects that a live frame was suppressed or failed, a complete terminal replay replaces that partial live stream only after its offsets prove every byte arrived. Watchdog-killed and older guests keep the best-effort live behavior. Raw child stream — no SCHED_OUTPUT_START/END framing.

§scheduler_stderr: String

The scheduler child’s stderr, using the same live-first, completion-proven terminal fallback semantics as Self::scheduler_stdout. Libbpf / log-crate output (including the BPF verifier log region between the -- BEGIN/END PROG LOAD LOG -- markers) typically lands here.

§attach: AttachOutcome

Whether the scheduler positively confirmed attach. Derived from the guest’s lifecycle frames (AttachOutcome). Attach is necessary but NOT sufficient for a cell PASS: this must be AttachOutcome::Attached (the guest emitted the definitive SchedulerAttached frame) AND Self::dispatched must be true. Verification alone (non-empty stats) is not enough — a scheduler whose BPF loads but never reaches sched_ext enabled, or a guest that vanishes before attach, is a real failure.

§dispatched: bool

Whether the guest confirmed the injected verifier workload dispatched — a WorkloadDispatched lifecycle frame, emitted by ktstr_guest_init Phase 5 when the SpinWait probe recorded a worker with non-zero iterations after requesting SCHED_EXT policy. This progress signal is not independent attach proof: schedulerless SCHED_EXT tasks may run through the kernel fallback. A cell PASSes only when this is true AND Self::attach is AttachOutcome::Attached: a scheduler that turns on (sched_ext enabled) but never dispatches a runnable task is a real, distinct failure — worse than never attaching — that the attach verdict alone cannot catch. Derived from the run’s lifecycle frames; scheduler-agnostic — the probe runs as SCHED_EXT, so the BPF scheduler dispatches it under any switch mode (full or SCX_OPS_SWITCH_PARTIAL) and non-zero worker progress proves dispatch, unlike an scx-specific nr_dispatched counter.

§scheduler_exited: bool

The guest scheduler-exit monitor observed the scheduler process disappear after startup. This is independent of the historical SchedulerAttached frame: attach-at-t1 followed by exit-at-t2 is a failure even if SCHED_EXT fallback later lets a probe worker run.

§guest_exit_code: Option<i32>

Explicit terminal verifier guest exit code from a crc-valid MSG_TYPE_EXIT frame. The verifier guest emits 0 only after worker progress, a live scheduler child, and sched_ext enabled are observed at the same completion edge. None is a failure: a generic VM shutdown is not terminal verifier evidence.

§timed_out: bool

The host watchdog fired (hard-deadline hang) before the guest exited. NOT orthogonal to Self::attach in the way the message once implied: a hang can occur EITHER after attach (a teardown wedge, leaving attach == Attached) OR before it (a scheduler that died / never reached enabled DURING BPF load and then wedged without rebooting, leaving attach at AttachOutcome::Died / AttachOutcome::NotAttached / AttachOutcome::Unconfirmed). An early kernel panic is the one case this flag does NOT cover: panic=-1 reboots via an i8042 reset (ExitAction::Shutdown, timed_out == false), caught by the attach gate as AttachOutcome::Unconfirmed instead. Because the hang is not attach-implying, Self::cell_verdict words the timeout message per Self::attach rather than always claiming “after attach”. A verifier cell FAILs on a hang.

§crash_message: Option<String>

The guest’s structured crash message (a PANIC:-prefixed line routed through the host’s extract_panic_message into crate::vmm::VmResult::crash_message), if any. A self-describing guest infra fault — most notably the AP-bring-up gap the boot retry exhausts — that Self::cell_verdict surfaces ABOVE the attach/dispatch gates, mirroring test_support::eval’s crash_message priority. None on the common no-crash path.

§dilation: Option<f64>

Host-side vCPU scheduling dilation for this cell’s VM run — D = 1 + Σrun_delay/Σon_cpu over the vCPU host threads (see vmm::result::HostVcpuSchedstat). None on hosts without CONFIG_SCHEDSTATS or when no vCPU thread was sampled. Purely observational: surfaced in the per-cell output but NEVER folded into Self::cell_verdict or the exit code.

Implementations§

Source§

impl VerifierVmResult

Source

pub fn cell_verdict(&self) -> Result<(), String>

The verifier cell PASS/FAIL verdict: Ok(()) when the scheduler verified its BPF, attached (sched_ext enabled), AND dispatched the injected workload; Err(reason) naming the first failing gate otherwise. Gate order is timeout, guest crash, observed scheduler exit, attach, dispatch, then explicit terminal guest exit. Root cause is reported first: an attach failure is named before the dispatch gate it necessarily also trips, and a terminal guest exit of 0 is required after all positive gates.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSend for T
where T: Send,