Expand description
A Rust-based testing framework for VMMs.
At this time - petri
supports testing OpenVMM, OpenHCL,
and Hyper-V based VMs.
Re-exports§
pub use pipette_client as pipette;
Modules§
- boot_
image_ type - Type-tags for
BootImageConfig
- disk_
image - Tools for building a disk image for a VM.
- openvmm
- OpenVMM VM management
Code managing the lifetime of a
PetriVmOpenVmm
. All VMs live the same lifecycle:
Macros§
- log
- Write a formatted log entry to the given
PetriLogFile
. - multitest
- Defines a set of tests from a
TestCase
. - test
- Defines a single test from a value that implements
RunTest
.
Structs§
- Artifact
Handle - A type-safe handle to a particular Artifact, as declared using the
declare_artifacts!
macro. - Artifact
Resolver - An artifact resolver, used both to express requirements for artifacts and to resolve them to paths.
- Boot
Image Config - Configuration information for the boot drive of the VM.
- Erased
Artifact Handle - A type-erased handle to a particular Artifact, with no information as to what exactly the artifact is.
- Open
HclServicing Flags - Flags controlling servicing behavior.
- Petri
LogFile - A log file for writing test output.
- Petri
LogSource - A source of
PetriLogFile
log files for test output. - Petri
Test Params - Parameters passed to a
RunTest
when it is run. - Processor
Topology - Common processor topology information for the VM.
- Resolved
Artifact - A resolved artifact path for artifact
A
. - Resolved
Optional Artifact - A resolve artifact path for an optional artifact
A
. - Simple
Test - A test defined by an artifact resolver function and a run function.
- Test
Artifact Requirements - A set of dependencies required to run a test.
- Test
Artifacts - A resolved set of test artifacts, returned by
TestArtifactRequirements::resolve
. - Test
Case - A single test case.
Enums§
- Apic
Mode - The APIC mode for the VM.
- Firmware
- Firmware to load into the test VM.
- Isolation
Type - Isolation type
- Pcat
Guest - The guest the VM will boot into. A boot drive with the chosen setup will be automatically configured.
- Petri
Vmgs Resource - Virtual machine guest state resource
- Shutdown
Kind - The kind of shutdown to perform.
- Uefi
Guest - The guest the VM will boot into. A boot drive with the chosen setup will be automatically configured.
Constants§
- SIZE_
1_ GB - 1 gibibyte’s worth of bytes.
- SIZE_
1_ KB - 1 kibibyte’s worth of bytes.
- SIZE_
1_ MB - 1 mebibyte’s worth of bytes.
Traits§
- AsArtifact
Handle - Helper trait to allow uniform handling of both typed and untyped artifact handles in various contexts.
- PetriVm
- A running VM that tests can interact with.
- Petri
VmConfig - Configuration state for a test VM.
- Resolve
Test Artifact - A trait to resolve artifacts to paths.
- RunTest
- A test that can be run.
Functions§
- kmsg_
log_ task - read from the kmsg stream and write entries to the log
- log_
stream - Logs lines from
reader
intolog_file
. - test_
main - Entry point for test binaries.
- try_
init_ tracing - Initialize Petri tracing with the given output path for log files.