mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
tests: Enable reboot test case on AArch64
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
parent
093a581ee1
commit
a278704ae0
@ -3914,7 +3914,6 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(target_arch = "x86_64")]
|
|
||||||
fn test_reboot() {
|
fn test_reboot() {
|
||||||
let mut bionic = UbuntuDiskConfig::new(BIONIC_IMAGE_NAME.to_string());
|
let mut bionic = UbuntuDiskConfig::new(BIONIC_IMAGE_NAME.to_string());
|
||||||
let mut focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
let mut focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
||||||
@ -3927,16 +3926,18 @@ mod tests {
|
|||||||
.for_each(|disk_config| {
|
.for_each(|disk_config| {
|
||||||
let guest = Guest::new(*disk_config);
|
let guest = Guest::new(*disk_config);
|
||||||
|
|
||||||
let mut child = GuestCommand::new(&guest)
|
let mut cmd = GuestCommand::new(&guest);
|
||||||
.args(&["--cpus", "boot=1"])
|
cmd.args(&["--cpus", "boot=1"])
|
||||||
.args(&["--memory", "size=512M"])
|
.args(&["--memory", "size=512M"])
|
||||||
.args(&["--kernel", guest.fw_path.as_str()])
|
.args(&["--kernel", guest.fw_path.as_str()])
|
||||||
.default_raw_disks()
|
.default_raw_disks()
|
||||||
.default_net()
|
.default_net()
|
||||||
.args(&["--serial", "tty", "--console", "off"])
|
.capture_output();
|
||||||
.capture_output()
|
|
||||||
.spawn()
|
#[cfg(target_arch = "aarch64")]
|
||||||
.unwrap();
|
cmd.args(&["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE]);
|
||||||
|
|
||||||
|
let mut child = cmd.spawn().unwrap();
|
||||||
|
|
||||||
let r = std::panic::catch_unwind(|| {
|
let r = std::panic::catch_unwind(|| {
|
||||||
guest.wait_vm_boot(Some(120)).unwrap();
|
guest.wait_vm_boot(Some(120)).unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user