microsoft/openvmm

Public

mirrored fromhttps://github.com/microsoft/openvmmAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
e6c778cbebacf3a70be1d39295b4f090134c4091

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

petri/src/lib.rs

41lines · modepreview

// Copyright (C) Microsoft Corporation. All rights reserved.

//! A Rust-based testing framework for VMMs.
//!
//! At this time - `petri` only supports testing OpenVMM and OpenHCL based VMs.
//! In the future, we expect `petri` to also support other VMM backends
//! (notably, Hyper-V).

#![forbid(unsafe_code)]
#![warn(missing_docs)]

mod disk_image;
mod linux_direct_serial_agent;
mod openhcl_diag;
mod tracing;
mod vm;
mod worker;

pub use petri_artifacts_core::ArtifactHandle;
pub use petri_artifacts_core::AsArtifactHandle;
pub use petri_artifacts_core::ErasedArtifactHandle;
pub use petri_artifacts_core::TestArtifactResolver;
pub use petri_artifacts_core::TestArtifactResolverBackend;
pub use petri_artifacts_core::TestArtifacts;
pub use pipette_client as pipette;
pub use vm::*;

/// 1 kibibyte's worth of bytes.
pub const SIZE_1_KB: u64 = 1024;
/// 1 mebibyte's worth of bytes.
pub const SIZE_1_MB: u64 = 1024 * SIZE_1_KB;
/// 1 gibibyte's worth of bytes.
pub const SIZE_1_GB: u64 = 1024 * SIZE_1_MB;

/// The kind of shutdown to perform.
#[allow(missing_docs)] // Self-describing names.
pub enum ShutdownKind {
    Shutdown,
    Reboot,
    // TODO: Add hibernate?
}