Skip to content

Commit 8c3fdcb

Browse files
committed
vmm-tests: correctly request vhost dependency, update mapping
1 parent 933b5bd commit 8c3fdcb

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

flowey/flowey_lib_hvlite/src/artifact_to_build_mapping.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ impl ResolvedArtifactSelections {
130130
true
131131
}
132132

133+
// OpenVMM vhost binary (Linux only)
134+
"petri_artifacts_vmm_test::artifacts::OPENVMM_VHOST_LINUX_X64"
135+
| "petri_artifacts_vmm_test::artifacts::OPENVMM_VHOST_LINUX_AARCH64" => {
136+
self.build.openvmm_vhost = true;
137+
true
138+
}
139+
133140
// OpenHCL IGVM files
134141
"petri_artifacts_vmm_test::artifacts::openhcl_igvm::LATEST_STANDARD_X64"
135142
| "petri_artifacts_vmm_test::artifacts::openhcl_igvm::LATEST_STANDARD_DEV_KERNEL_X64"

vmm_tests/vmm_tests/tests/tests/multiarch.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ use petri::PetriHaltReason;
1010
use petri::PetriVmBuilder;
1111
use petri::PetriVmmBackend;
1212
use petri::ProcessorTopology;
13+
use petri::ResolvedArtifact;
1314
use petri::SIZE_1_GB;
1415
use petri::ShutdownKind;
1516
use petri::openvmm::OpenVmmPetriBackend;
1617
use petri::pipette::cmd;
1718
use petri_artifacts_common::tags::MachineArch;
1819
use petri_artifacts_common::tags::OsFlavor;
20+
#[cfg(target_os = "linux")]
21+
use petri_artifacts_vmm_test::artifacts::OPENVMM_VHOST_NATIVE;
1922
use vmm_test_macros::openvmm_test;
2023
use vmm_test_macros::vmm_test;
2124
use vmm_test_macros::vmm_test_with;
@@ -481,10 +484,13 @@ async fn guest_test_uefi<T: PetriVmmBackend>(config: PetriVmBuilder<T>) -> anyho
481484
/// virtio transport → frontend protocol → socket → backend protocol →
482485
/// virtio-blk device → disk file.
483486
#[cfg(target_os = "linux")]
484-
#[openvmm_test(linux_direct_x64, linux_direct_aarch64)]
485-
async fn vhost_user_blk_device(
487+
#[openvmm_test(
488+
linux_direct_x64[OPENVMM_VHOST_NATIVE],
489+
linux_direct_aarch64[OPENVMM_VHOST_NATIVE],
490+
)]
491+
async fn vhost_user_blk_device<T>(
486492
config: PetriVmBuilder<OpenVmmPetriBackend>,
487-
_extra_deps: (),
493+
extra_deps: (ResolvedArtifact<T>,),
488494
driver: pal_async::DefaultDriver,
489495
) -> anyhow::Result<()> {
490496
use openvmm_defs::config::VirtioBus;
@@ -493,8 +499,8 @@ async fn vhost_user_blk_device(
493499
use virtio_resources::vhost_user::VhostUserDeviceHandle;
494500
use vm_resource::IntoResource;
495501

496-
let openvmm_vhost_path =
497-
petri_artifact_resolver_openvmm_known_paths::get_output_executable_path("openvmm_vhost")?;
502+
let (openvmm_vhost_artifact,) = extra_deps;
503+
let openvmm_vhost_path = openvmm_vhost_artifact.get();
498504

499505
let log_file = config.log_source().log_file("openvmm_vhost")?;
500506

0 commit comments

Comments
 (0)