Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5a61f44
support test igvmagent for vmm tests
mingweishih Nov 25, 2025
2b0d8c6
Merge remote-tracking branch 'openvmm/main' into test_igvm_agent
mingweishih Nov 25, 2025
7e7e0d6
wip - support in-house test igvm agent
mingweishih Dec 2, 2025
398d219
Merge remote-tracking branch 'openvmm/main' into test_igvm_agent
mingweishih Dec 2, 2025
bd80496
Merge remote-tracking branch 'openvmm/main' into test_igvm_agent
mingweishih Dec 2, 2025
24b2d9b
update
mingweishih Dec 2, 2025
b00172d
safety comment
mingweishih Dec 3, 2025
0aadbcc
x
mingweishih Dec 3, 2025
b0f3dea
missing file
mingweishih Dec 3, 2025
2757483
fix
mingweishih Dec 3, 2025
859ef12
x
mingweishih Dec 3, 2025
c78b43c
x
mingweishih Dec 3, 2025
9362454
try
mingweishih Dec 3, 2025
be86612
x
mingweishih Dec 3, 2025
cbc4e0e
x
mingweishih Dec 3, 2025
8901d7b
x
mingweishih Dec 4, 2025
c69c03b
Merge remote-tracking branch 'openvmm/main' into test_igvm_agent
mingweishih Dec 4, 2025
3af3f2b
try
mingweishih Dec 4, 2025
889cb08
x
mingweishih Dec 4, 2025
5e2f250
x
mingweishih Dec 4, 2025
e867ad9
x
mingweishih Dec 4, 2025
6e0bb85
global initializer
mingweishih Dec 5, 2025
7ff1a62
x
mingweishih Dec 5, 2025
c055cdd
try resolving leak
mingweishih Dec 5, 2025
2044482
test
mingweishih Dec 5, 2025
a8ba3d3
try
mingweishih Dec 6, 2025
18ab177
x
mingweishih Dec 6, 2025
9ee01a5
Merge remote-tracking branch 'openvmm/main' into test_igvm_agent
mingweishih Dec 6, 2025
374ecc9
comments
mingweishih Dec 8, 2025
66f2732
Merge remote-tracking branch 'openvmm/main' into test_igvm_agent
mingweishih Dec 8, 2025
486dd51
job does not really work
mingweishih Dec 10, 2025
12b4428
Merge remote-tracking branch 'openvmm/main' into test_igvm_agent
mingweishih Dec 10, 2025
571fa53
debug
mingweishih Dec 10, 2025
c39c0b7
debug
mingweishih Dec 16, 2025
b9c7501
Merge remote-tracking branch 'openvmm/main' into test_igvm_agent
mingweishih Dec 16, 2025
5d1815f
test
mingweishih Dec 16, 2025
b751b5f
order
mingweishih Dec 16, 2025
a5cc8b0
test flowey change
mingweishih Dec 17, 2025
7c4d9f8
update
mingweishih Dec 17, 2025
d0b771a
Merge remote-tracking branch 'openvmm/main' into test_igvm_agent
mingweishih Dec 17, 2025
c9b7868
x
mingweishih Dec 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 116 additions & 57 deletions .github/workflows/openvmm-ci.yaml

Large diffs are not rendered by default.

173 changes: 116 additions & 57 deletions .github/workflows/openvmm-pr-release.yaml

Large diffs are not rendered by default.

173 changes: 116 additions & 57 deletions .github/workflows/openvmm-pr.yaml

Large diffs are not rendered by default.

39 changes: 35 additions & 4 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2625,7 +2625,6 @@ name = "guest_emulation_device"
version = "0.0.0"
dependencies = [
"async-trait",
"base64 0.22.1",
"disk_backend",
"disklayer_ram",
"futures",
Expand All @@ -2636,15 +2635,13 @@ dependencies = [
"inspect",
"jiff",
"mesh",
"openhcl_attestation_protocol",
"pal_async",
"parking_lot",
"power_resources",
"rsa",
"scsi_buffers",
"serde_json",
"sha2",
"task_control",
"test_igvm_agent_lib",
"thiserror 2.0.16",
"tracelimit",
"tracing",
Expand Down Expand Up @@ -7217,6 +7214,40 @@ dependencies = [
"windows-sys 0.60.2",
]

[[package]]
name = "test_igvm_agent_lib"
version = "0.0.0"
dependencies = [
"base64 0.22.1",
"get_resources",
"inspect",
"openhcl_attestation_protocol",
"rsa",
"serde_json",
"sha2",
"thiserror 2.0.16",
"tracing",
"zerocopy 0.8.27",
]

[[package]]
name = "test_igvm_agent_rpc_server"
version = "0.0.0"
dependencies = [
"cc",
"cfg-if",
"clap",
"get_resources",
"guid",
"parking_lot",
"serde_json",
"test_igvm_agent_lib",
"tracing",
"tracing-subscriber",
"winapi",
"windows-sys 0.61.0",
]

[[package]]
name = "test_with_tracing"
version = "0.0.0"
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ members = [
# tools
"petri/make_imc_hive",
"petri/petri-tool",
"vm/devices/get/test_igvm_agent_rpc_server",
"vm/devices/tpm/tpm_guest_tests",
"vm/loader/igvmfilegen",
"vm/vmgs/vmgs_lib",
Expand Down Expand Up @@ -224,6 +225,7 @@ get_protocol = { path = "vm/devices/get/get_protocol" }
get_resources = { path = "vm/devices/get/get_resources" }
guest_crash_device = { path = "vm/devices/get/guest_crash_device" }
guest_emulation_device = { path = "vm/devices/get/guest_emulation_device" }
test_igvm_agent_lib = { path = "vm/devices/get/test_igvm_agent_lib" }
guest_emulation_log = { path = "vm/devices/get/guest_emulation_log" }
guest_emulation_transport = { path = "vm/devices/get/guest_emulation_transport" }
vtl2_settings_proto = { path = "vm/devices/get/vtl2_settings_proto" }
Expand Down Expand Up @@ -420,6 +422,7 @@ bitvec = { version = "1.1", default-features = false }
blocking = "1.2"
caps = "0.5"
cargo_toml = "0.22"
cc = "1.2.34"
cfg-if = "1"
clap = "4.2"
crc32fast = { version = "1.3.2", default-features = false }
Expand Down
28 changes: 27 additions & 1 deletion flowey/flowey_hvlite/src/pipelines/checkin_gates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ impl IntoPipeline for CheckinGatesCli {
let (pub_tpm_guest_tests, use_tpm_guest_tests_windows) =
pipeline.new_typed_artifact(format!("{arch_tag}-windows-tpm_guest_tests"));

let (pub_test_igvm_agent_rpc_server, use_test_igvm_agent_rpc_server) = pipeline
.new_typed_artifact(format!("{arch_tag}-windows-test_igvm_agent_rpc_server"));

// filter off interesting artifacts required by the VMM tests job
match arch {
CommonArch::X86_64 => {
Expand All @@ -268,6 +271,8 @@ impl IntoPipeline for CheckinGatesCli {
vmm_tests_artifacts_windows_x86.use_vmgstool = Some(use_vmgstool.clone());
vmm_tests_artifacts_windows_x86.use_tpm_guest_tests_windows =
Some(use_tpm_guest_tests_windows.clone());
vmm_tests_artifacts_windows_x86.use_test_igvm_agent_rpc_server =
Some(use_test_igvm_agent_rpc_server.clone());
}
CommonArch::Aarch64 => {
vmm_tests_artifacts_windows_aarch64.use_openvmm = Some(use_openvmm.clone());
Expand Down Expand Up @@ -403,7 +408,18 @@ impl IntoPipeline for CheckinGatesCli {
},
profile: CommonProfile::from_release(release),
tpm_guest_tests: ctx.publish_typed_artifact(pub_tpm_guest_tests),
});
})
.dep_on(
|ctx| flowey_lib_hvlite::build_test_igvm_agent_rpc_server::Request {
target: CommonTriple::Common {
arch,
platform: CommonPlatform::WindowsMsvc,
},
profile: CommonProfile::from_release(release),
test_igvm_agent_rpc_server: ctx
.publish_typed_artifact(pub_test_igvm_agent_rpc_server),
},
);

// Hang building the windows VMM tests off this big windows job.
match arch {
Expand Down Expand Up @@ -1186,6 +1202,7 @@ mod vmm_tests_artifact_builders {
use flowey_lib_hvlite::build_openvmm::OpenvmmOutput;
use flowey_lib_hvlite::build_pipette::PipetteOutput;
use flowey_lib_hvlite::build_prep_steps::PrepStepsOutput;
use flowey_lib_hvlite::build_test_igvm_agent_rpc_server::TestIgvmAgentRpcServerOutput;
use flowey_lib_hvlite::build_tmk_vmm::TmkVmmOutput;
use flowey_lib_hvlite::build_tmks::TmksOutput;
use flowey_lib_hvlite::build_tpm_guest_tests::TpmGuestTestsOutput;
Expand Down Expand Up @@ -1239,6 +1256,7 @@ mod vmm_tests_artifact_builders {
vmgstool: None,
tpm_guest_tests_windows: None,
tpm_guest_tests_linux: None,
test_igvm_agent_rpc_server: None,
}))
}
}
Expand All @@ -1253,6 +1271,7 @@ mod vmm_tests_artifact_builders {
pub use_vmgstool: Option<UseTypedArtifact<VmgstoolOutput>>,
pub use_tpm_guest_tests_windows: Option<UseTypedArtifact<TpmGuestTestsOutput>>,
pub use_tpm_guest_tests_linux: Option<UseTypedArtifact<TpmGuestTestsOutput>>,
pub use_test_igvm_agent_rpc_server: Option<UseTypedArtifact<TestIgvmAgentRpcServerOutput>>,
// linux build machine
pub use_openhcl_igvm_files: Option<UseArtifact>,
pub use_pipette_linux_musl: Option<UseTypedArtifact<PipetteOutput>>,
Expand All @@ -1277,6 +1296,7 @@ mod vmm_tests_artifact_builders {
use_vmgstool,
use_tpm_guest_tests_windows,
use_tpm_guest_tests_linux,
use_test_igvm_agent_rpc_server,
} = self;

let use_openvmm = use_openvmm.ok_or("openvmm")?;
Expand All @@ -1293,6 +1313,8 @@ mod vmm_tests_artifact_builders {
use_tpm_guest_tests_windows.ok_or("tpm_guest_tests_windows")?;
let use_tpm_guest_tests_linux =
use_tpm_guest_tests_linux.ok_or("tpm_guest_tests_linux")?;
let use_test_igvm_agent_rpc_server =
use_test_igvm_agent_rpc_server.ok_or("test_igvm_agent_rpc_server")?;

Ok(Box::new(move |ctx| VmmTestsDepArtifacts {
openvmm: Some(ctx.use_typed_artifact(&use_openvmm)),
Expand All @@ -1307,6 +1329,9 @@ mod vmm_tests_artifact_builders {
vmgstool: Some(ctx.use_typed_artifact(&use_vmgstool)),
tpm_guest_tests_windows: Some(ctx.use_typed_artifact(&use_tpm_guest_tests_windows)),
tpm_guest_tests_linux: Some(ctx.use_typed_artifact(&use_tpm_guest_tests_linux)),
test_igvm_agent_rpc_server: Some(
ctx.use_typed_artifact(&use_test_igvm_agent_rpc_server),
),
}))
}
}
Expand Down Expand Up @@ -1364,6 +1389,7 @@ mod vmm_tests_artifact_builders {
vmgstool: Some(ctx.use_typed_artifact(&use_vmgstool)),
tpm_guest_tests_windows: None,
tpm_guest_tests_linux: None,
test_igvm_agent_rpc_server: None,
}))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::build_nextest_vmm_tests::NextestVmmTestsArchive;
use crate::build_openvmm::OpenvmmOutput;
use crate::build_pipette::PipetteOutput;
use crate::build_prep_steps::PrepStepsOutput;
use crate::build_test_igvm_agent_rpc_server::TestIgvmAgentRpcServerOutput;
use crate::build_tmk_vmm::TmkVmmOutput;
use crate::build_tmks::TmksOutput;
use crate::build_tpm_guest_tests::TpmGuestTestsOutput;
Expand All @@ -32,6 +33,7 @@ pub struct VmmTestsDepArtifacts {
pub vmgstool: Option<ReadVar<VmgstoolOutput>>,
pub tpm_guest_tests_windows: Option<ReadVar<TpmGuestTestsOutput>>,
pub tpm_guest_tests_linux: Option<ReadVar<TpmGuestTestsOutput>>,
pub test_igvm_agent_rpc_server: Option<ReadVar<TestIgvmAgentRpcServerOutput>>,
}

flowey_request! {
Expand Down Expand Up @@ -75,6 +77,7 @@ impl SimpleFlowNode for Node {
ctx.import::<crate::install_vmm_tests_deps::Node>();
ctx.import::<crate::init_vmm_tests_env::Node>();
ctx.import::<crate::run_prep_steps::Node>();
ctx.import::<crate::run_test_igvm_agent_rpc_server::Node>();
ctx.import::<crate::test_nextest_vmm_tests_archive::Node>();
ctx.import::<flowey_lib_common::publish_test_results::Node>();
}
Expand Down Expand Up @@ -112,6 +115,7 @@ impl SimpleFlowNode for Node {
vmgstool: register_vmgstool,
tpm_guest_tests_windows: register_tpm_guest_tests_windows,
tpm_guest_tests_linux: register_tpm_guest_tests_linux,
test_igvm_agent_rpc_server: register_test_igvm_agent_rpc_server,
} = dep_artifact_dirs;

let register_openhcl_igvm_files = artifact_dir_openhcl_igvm_files.map(|artifact_dir| {
Expand Down Expand Up @@ -176,6 +180,7 @@ impl SimpleFlowNode for Node {
register_vmgstool,
register_tpm_guest_tests_windows,
register_tpm_guest_tests_linux,
register_test_igvm_agent_rpc_server,
disk_images_dir: Some(disk_images_dir),
register_openhcl_igvm_files,
get_test_log_path: Some(get_test_log_path),
Expand All @@ -184,6 +189,22 @@ impl SimpleFlowNode for Node {
use_relative_paths: false,
});

// Start the test_igvm_agent_rpc_server before running tests (Windows only).
// This must happen after init_vmm_tests_env which copies the binary.
// The server runs in the background for the duration of the test run.
// The node itself handles the platform check at runtime.
if matches!(
target.operating_system,
target_lexicon::OperatingSystem::Windows
) {
pre_run_deps.push(
ctx.reqv(|done| crate::run_test_igvm_agent_rpc_server::Request {
env: extra_env.clone(),
done,
}),
);
}

if needs_prep_run {
pre_run_deps.push(ctx.reqv(|done| crate::run_prep_steps::Request {
prep_steps: register_prep_steps.expect("Test run indicated prep_steps was needed but built prep_steps binary was not given"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ pub struct BuildSelections {
pub vmgstool: bool,
pub tpm_guest_tests_windows: bool,
pub tpm_guest_tests_linux: bool,
pub test_igvm_agent_rpc_server: bool,
}

// Build everything we can by default
Expand All @@ -136,6 +137,7 @@ impl Default for BuildSelections {
vmgstool: true,
tpm_guest_tests_windows: true,
tpm_guest_tests_linux: true,
test_igvm_agent_rpc_server: true,
}
}
}
Expand Down Expand Up @@ -182,7 +184,9 @@ impl SimpleFlowNode for Node {
ctx.import::<crate::build_tmks::Node>();
ctx.import::<crate::build_tmk_vmm::Node>();
ctx.import::<crate::build_tpm_guest_tests::Node>();
ctx.import::<crate::build_test_igvm_agent_rpc_server::Node>();
ctx.import::<crate::download_openvmm_vmm_tests_artifacts::Node>();
ctx.import::<crate::run_test_igvm_agent_rpc_server::Node>();
ctx.import::<crate::download_release_igvm_files_from_gh::resolve::Node>();
ctx.import::<crate::init_vmm_tests_env::Node>();
ctx.import::<crate::test_nextest_vmm_tests_archive::Node>();
Expand Down Expand Up @@ -290,6 +294,7 @@ impl SimpleFlowNode for Node {
filter.push_str(" & !test(windows)");
build.pipette_windows = false;
build.tpm_guest_tests_windows = false;
build.test_igvm_agent_rpc_server = false;
}
if !freebsd {
filter.push_str(" & !test(freebsd)");
Expand Down Expand Up @@ -402,6 +407,7 @@ impl SimpleFlowNode for Node {
build.pipette_linux = false;
build.tmk_vmm_linux = false;
build.tpm_guest_tests_linux = false;
build.test_igvm_agent_rpc_server = false;
}

let register_openhcl_igvm_files = build.openhcl.then(|| {
Expand Down Expand Up @@ -664,6 +670,25 @@ impl SimpleFlowNode for Node {
output
});

let register_test_igvm_agent_rpc_server = build.test_igvm_agent_rpc_server.then(|| {
let output = ctx.reqv(|v| crate::build_test_igvm_agent_rpc_server::Request {
target: CommonTriple::Common {
arch,
platform: CommonPlatform::WindowsMsvc,
},
profile: CommonProfile::from_release(release),
test_igvm_agent_rpc_server: v,
});

if copy_extras {
copy_to_dir.push((
extras_dir.to_owned(),
output.map(ctx, |x| Some(x.pdb.clone())),
));
}
output
});

let register_tmk_vmm = build.tmk_vmm_windows.then(|| {
let output = ctx.reqv(|v| crate::build_tmk_vmm::Request {
target: CommonTriple::Common {
Expand Down Expand Up @@ -882,6 +907,7 @@ impl SimpleFlowNode for Node {
register_vmgstool,
register_tpm_guest_tests_windows,
register_tpm_guest_tests_linux,
register_test_igvm_agent_rpc_server,
disk_images_dir: Some(test_artifacts_dir),
register_openhcl_igvm_files,
get_test_log_path: None,
Expand Down Expand Up @@ -994,6 +1020,20 @@ impl SimpleFlowNode for Node {
}
} else {
side_effects.push(ctx.reqv(crate::install_vmm_tests_deps::Request::Install));

// Start the test_igvm_agent_rpc_server before running tests (Windows only).
if matches!(
target_triple.operating_system,
target_lexicon::OperatingSystem::Windows
) {
side_effects.push(ctx.reqv(|done| {
crate::run_test_igvm_agent_rpc_server::Request {
env: extra_env.clone(),
done,
}
}));
}

if let Some((prep_steps, _)) = register_prep_steps {
side_effects.push(ctx.reqv(|done| crate::run_prep_steps::Request {
prep_steps,
Expand Down
Loading