mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Consolidate live migration tests into common scopes
Move the live migration tests themselves into the common scopes allowing the tests to now run interleaved together hopefully reducing CI time. On MSHV the live migration tests are now not compiled in rather than compiled in and skipped (as the helpers are not compiled in for MSHV.) Assisted-by: Claude:Opus-4.7 Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -5,7 +5,9 @@ use std::collections::HashMap;
|
||||
use std::fs::{File, OpenOptions};
|
||||
use std::io::{BufRead, Read, Seek, SeekFrom, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::{Child, Command, Stdio};
|
||||
#[cfg(not(feature = "mshv"))]
|
||||
use std::process::Stdio;
|
||||
use std::process::{Child, Command};
|
||||
use std::string::String;
|
||||
use std::sync::mpsc;
|
||||
use std::sync::mpsc::Receiver;
|
||||
@@ -14,6 +16,7 @@ use std::{cmp, fs, io, thread};
|
||||
|
||||
use test_infra::*;
|
||||
use vmm_sys_util::tempdir::TempDir;
|
||||
#[cfg(not(feature = "mshv"))]
|
||||
use wait_timeout::ChildExt;
|
||||
|
||||
const QCOW2_INCOMPATIBLE_FEATURES_OFFSET: u64 = 72;
|
||||
@@ -1061,6 +1064,7 @@ pub(crate) fn bdf_from_hotplug_response(
|
||||
(segment_id, bus_id, device_id, function_id)
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "mshv"))]
|
||||
pub(crate) fn start_live_migration(
|
||||
migration_socket: &str,
|
||||
src_api_socket: &str,
|
||||
@@ -1146,6 +1150,7 @@ pub(crate) fn start_live_migration(
|
||||
send_success && receive_success
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "mshv"))]
|
||||
pub(crate) fn print_and_panic(
|
||||
src_vm: Child,
|
||||
dest_vm: Child,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user