microsoft/openvmm

Public

mirrored from https://github.com/microsoft/openvmmAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
8bd6d8fd5fcd4e4efdee54f2c1fd165a93cfb9c3

Branches

Tags

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

Clone

HTTPS

Download ZIP

petri/src/lib.rs

42lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4//! A Rust-based testing framework for VMMs.
5//!
6//! At this time - `petri` only supports testing OpenVMM and OpenHCL based VMs.
7//! In the future, we expect `petri` to also support other VMM backends
8//! (notably, Hyper-V).
9
10#![forbid(unsafe_code)]
11#![warn(missing_docs)]
12
13mod disk_image;
14mod linux_direct_serial_agent;
15mod openhcl_diag;
16mod tracing;
17mod vm;
18mod worker;
19
20pub use petri_artifacts_core::ArtifactHandle;
21pub use petri_artifacts_core::AsArtifactHandle;
22pub use petri_artifacts_core::ErasedArtifactHandle;
23pub use petri_artifacts_core::TestArtifactResolver;
24pub use petri_artifacts_core::TestArtifactResolverBackend;
25pub use petri_artifacts_core::TestArtifacts;
26pub use pipette_client as pipette;
27pub use vm::*;
28
29/// 1 kibibyte's worth of bytes.
30pub const SIZE_1_KB: u64 = 1024;
31/// 1 mebibyte's worth of bytes.
32pub const SIZE_1_MB: u64 = 1024 * SIZE_1_KB;
33/// 1 gibibyte's worth of bytes.
34pub const SIZE_1_GB: u64 = 1024 * SIZE_1_MB;
35
36/// The kind of shutdown to perform.
37#[allow(missing_docs)] // Self-describing names.
38pub enum ShutdownKind {
39 Shutdown,
40 Reboot,
41 // TODO: Add hibernate?
42}