mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
tests: Enable virtio-mmio tests for virtio-console
This is useful to ensure that virtio-console support is covered. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
3800acd347
commit
81ce8f505c
@ -3034,19 +3034,26 @@ mod tests {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(not(feature = "mmio"), test)]
|
#[test]
|
||||||
fn test_virtio_console() {
|
fn test_virtio_console() {
|
||||||
test_block!(tb, "", {
|
test_block!(tb, "", {
|
||||||
let mut focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
let mut focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
||||||
let guest = Guest::new(&mut focal);
|
let guest = Guest::new(&mut focal);
|
||||||
|
|
||||||
|
let mut workload_path = dirs::home_dir().unwrap();
|
||||||
|
workload_path.push("workloads");
|
||||||
|
let mut kernel_path = workload_path;
|
||||||
|
kernel_path.push("vmlinux");
|
||||||
|
|
||||||
let mut child = GuestCommand::new(&guest)
|
let mut child = GuestCommand::new(&guest)
|
||||||
.args(&["--cpus", "boot=1"])
|
.args(&["--cpus", "boot=1"])
|
||||||
.args(&["--memory", "size=512M"])
|
.args(&["--memory", "size=512M"])
|
||||||
.args(&["--kernel", guest.fw_path.as_str()])
|
.args(&["--kernel", kernel_path.to_str().unwrap()])
|
||||||
|
.args(&["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE])
|
||||||
.default_disks()
|
.default_disks()
|
||||||
.default_net()
|
.default_net()
|
||||||
.args(&["--console", "tty"])
|
.args(&["--console", "tty"])
|
||||||
|
.args(&["--serial", "null"])
|
||||||
.capture_output()
|
.capture_output()
|
||||||
.spawn()
|
.spawn()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user