mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-08 12:41:35 +00:00
tests: integration: Don't always have kernel serial output
When doing a direct kernel boot only have console=ttyS0 in the command line if we are explicitly testing the serial output. The default behaviour is `--serial null` so this output will not be visible but will trigger a KVM exit for every byte which is very costly when running under nested virtualization. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
8a27735826
commit
a4c076bd09
@ -95,7 +95,7 @@ mod tests {
|
|||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-arm64-custom";
|
const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-arm64-custom";
|
||||||
|
|
||||||
const DIRECT_KERNEL_BOOT_CMDLINE: &str = "root=/dev/vda1 console=ttyS0 console=hvc0 quiet rw";
|
const DIRECT_KERNEL_BOOT_CMDLINE: &str = "root=/dev/vda1 console=hvc0 quiet rw";
|
||||||
|
|
||||||
const PIPE_SIZE: i32 = 32 << 20;
|
const PIPE_SIZE: i32 = 32 << 20;
|
||||||
|
|
||||||
@ -3295,12 +3295,7 @@ mod tests {
|
|||||||
.args(&["--kernel", kernel_path.to_str().unwrap()])
|
.args(&["--kernel", kernel_path.to_str().unwrap()])
|
||||||
.default_disks()
|
.default_disks()
|
||||||
.default_net()
|
.default_net()
|
||||||
.args(&[
|
.args(&["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE])
|
||||||
"--cmdline",
|
|
||||||
DIRECT_KERNEL_BOOT_CMDLINE
|
|
||||||
.replace("console=ttyS0 ", "")
|
|
||||||
.as_str(),
|
|
||||||
])
|
|
||||||
.args(&["--serial", "off"])
|
.args(&["--serial", "off"])
|
||||||
.capture_output()
|
.capture_output()
|
||||||
.spawn()
|
.spawn()
|
||||||
@ -3389,7 +3384,12 @@ mod tests {
|
|||||||
.args(&["--cpus", "boot=1"])
|
.args(&["--cpus", "boot=1"])
|
||||||
.args(&["--memory", "size=512M"])
|
.args(&["--memory", "size=512M"])
|
||||||
.args(&["--kernel", kernel_path.to_str().unwrap()])
|
.args(&["--kernel", kernel_path.to_str().unwrap()])
|
||||||
.args(&["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE])
|
.args(&[
|
||||||
|
"--cmdline",
|
||||||
|
DIRECT_KERNEL_BOOT_CMDLINE
|
||||||
|
.replace("console=hvc0 ", "console=ttyS0")
|
||||||
|
.as_str(),
|
||||||
|
])
|
||||||
.default_disks()
|
.default_disks()
|
||||||
.default_net()
|
.default_net()
|
||||||
.args(&["--serial", "tty"])
|
.args(&["--serial", "tty"])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user