mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-21 15:31:15 +00:00
ci: Fix mmio tests with direct kernel boot
The hypervisor-fw does not support virtio-blk through mmio transport layer, therefore we can only run tests with mmio if these tests boot directly to kernel. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
f2682463a4
commit
4de258477e
@ -1235,6 +1235,12 @@ mod tests {
|
|||||||
let mut clear = ClearDiskConfig::new();
|
let mut clear = ClearDiskConfig::new();
|
||||||
let guest = Guest::new(&mut clear);
|
let guest = Guest::new(&mut clear);
|
||||||
|
|
||||||
|
let mut workload_path = dirs::home_dir().unwrap();
|
||||||
|
workload_path.push("workloads");
|
||||||
|
|
||||||
|
let mut kernel_path = workload_path;
|
||||||
|
kernel_path.push("vmlinux");
|
||||||
|
|
||||||
let (net_params, daemon_child) = if self_spawned {
|
let (net_params, daemon_child) = if self_spawned {
|
||||||
(
|
(
|
||||||
format!(
|
format!(
|
||||||
@ -1261,7 +1267,15 @@ mod tests {
|
|||||||
let mut cloud_child = GuestCommand::new(&guest)
|
let mut cloud_child = GuestCommand::new(&guest)
|
||||||
.args(&["--cpus", format!("boot={}", num_queues / 2).as_str()])
|
.args(&["--cpus", format!("boot={}", num_queues / 2).as_str()])
|
||||||
.args(&["--memory", "size=512M,file=/dev/shm"])
|
.args(&["--memory", "size=512M,file=/dev/shm"])
|
||||||
.args(&["--kernel", guest.fw_path.as_str()])
|
.args(&["--kernel", kernel_path.to_str().unwrap()])
|
||||||
|
.args(&[
|
||||||
|
"--cmdline",
|
||||||
|
"root=PARTUUID=6fb4d1a8-6c8c-4dd7-9f7c-1fe0b9f2574c \
|
||||||
|
console=tty0 console=ttyS0,115200n8 console=hvc0 quiet \
|
||||||
|
init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable \
|
||||||
|
no_timer_check noreplace-smp cryptomgr.notests \
|
||||||
|
rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw",
|
||||||
|
])
|
||||||
.default_disks()
|
.default_disks()
|
||||||
.args(&["--net", net_params.as_str()])
|
.args(&["--net", net_params.as_str()])
|
||||||
.spawn()
|
.spawn()
|
||||||
@ -1369,10 +1383,13 @@ mod tests {
|
|||||||
let mut clear = ClearDiskConfig::new();
|
let mut clear = ClearDiskConfig::new();
|
||||||
let guest = Guest::new(&mut clear);
|
let guest = Guest::new(&mut clear);
|
||||||
|
|
||||||
let (blk_params, daemon_child) = if self_spawned {
|
let mut workload_path = dirs::home_dir().unwrap();
|
||||||
let mut workload_path = dirs::home_dir().unwrap();
|
workload_path.push("workloads");
|
||||||
workload_path.push("workloads");
|
|
||||||
|
|
||||||
|
let mut kernel_path = workload_path.clone();
|
||||||
|
kernel_path.push("vmlinux");
|
||||||
|
|
||||||
|
let (blk_params, daemon_child) = if self_spawned {
|
||||||
let mut blk_file_path = workload_path;
|
let mut blk_file_path = workload_path;
|
||||||
blk_file_path.push("blk.img");
|
blk_file_path.push("blk.img");
|
||||||
let blk_file_path = String::from(blk_file_path.to_str().unwrap());
|
let blk_file_path = String::from(blk_file_path.to_str().unwrap());
|
||||||
@ -1402,7 +1419,15 @@ mod tests {
|
|||||||
let mut cloud_child = GuestCommand::new(&guest)
|
let mut cloud_child = GuestCommand::new(&guest)
|
||||||
.args(&["--cpus", format!("boot={}", num_queues).as_str()])
|
.args(&["--cpus", format!("boot={}", num_queues).as_str()])
|
||||||
.args(&["--memory", "size=512M,file=/dev/shm"])
|
.args(&["--memory", "size=512M,file=/dev/shm"])
|
||||||
.args(&["--kernel", guest.fw_path.as_str()])
|
.args(&["--kernel", kernel_path.to_str().unwrap()])
|
||||||
|
.args(&[
|
||||||
|
"--cmdline",
|
||||||
|
"root=PARTUUID=6fb4d1a8-6c8c-4dd7-9f7c-1fe0b9f2574c \
|
||||||
|
console=tty0 console=ttyS0,115200n8 console=hvc0 quiet \
|
||||||
|
init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable \
|
||||||
|
no_timer_check noreplace-smp cryptomgr.notests \
|
||||||
|
rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw",
|
||||||
|
])
|
||||||
.args(&[
|
.args(&[
|
||||||
"--disk",
|
"--disk",
|
||||||
format!(
|
format!(
|
||||||
@ -1529,6 +1554,13 @@ mod tests {
|
|||||||
test_block!(tb, "", {
|
test_block!(tb, "", {
|
||||||
let mut clear = ClearDiskConfig::new();
|
let mut clear = ClearDiskConfig::new();
|
||||||
let guest = Guest::new(&mut clear);
|
let guest = Guest::new(&mut clear);
|
||||||
|
|
||||||
|
let mut workload_path = dirs::home_dir().unwrap();
|
||||||
|
workload_path.push("workloads");
|
||||||
|
|
||||||
|
let mut kernel_path = workload_path;
|
||||||
|
kernel_path.push("vmlinux");
|
||||||
|
|
||||||
let disk_path = guest
|
let disk_path = guest
|
||||||
.disk_config
|
.disk_config
|
||||||
.disk(DiskType::RawOperatingSystem)
|
.disk(DiskType::RawOperatingSystem)
|
||||||
@ -1565,7 +1597,15 @@ mod tests {
|
|||||||
let mut cloud_child = GuestCommand::new(&guest)
|
let mut cloud_child = GuestCommand::new(&guest)
|
||||||
.args(&["--cpus", format!("boot={}", num_queues).as_str()])
|
.args(&["--cpus", format!("boot={}", num_queues).as_str()])
|
||||||
.args(&["--memory", "size=512M,file=/dev/shm"])
|
.args(&["--memory", "size=512M,file=/dev/shm"])
|
||||||
.args(&["--kernel", guest.fw_path.as_str()])
|
.args(&["--kernel", kernel_path.to_str().unwrap()])
|
||||||
|
.args(&[
|
||||||
|
"--cmdline",
|
||||||
|
"root=PARTUUID=6fb4d1a8-6c8c-4dd7-9f7c-1fe0b9f2574c \
|
||||||
|
console=tty0 console=ttyS0,115200n8 console=hvc0 quiet \
|
||||||
|
init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable \
|
||||||
|
no_timer_check noreplace-smp cryptomgr.notests \
|
||||||
|
rootfstype=ext4,btrfs,xfs kvm-intel.nested=1 rw",
|
||||||
|
])
|
||||||
.args(&[
|
.args(&[
|
||||||
"--disk",
|
"--disk",
|
||||||
blk_boot_params.as_str(),
|
blk_boot_params.as_str(),
|
||||||
|
Loading…
Reference in New Issue
Block a user