From a278704ae044b9810cfb84f7867bd4258844b346 Mon Sep 17 00:00:00 2001 From: Michael Zhao Date: Thu, 29 Oct 2020 23:12:45 +0800 Subject: [PATCH] tests: Enable reboot test case on AArch64 Signed-off-by: Michael Zhao --- tests/integration.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index ae360ede9..a85bcab92 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -3914,7 +3914,6 @@ mod tests { } #[test] - #[cfg(target_arch = "x86_64")] fn test_reboot() { let mut bionic = UbuntuDiskConfig::new(BIONIC_IMAGE_NAME.to_string()); let mut focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); @@ -3927,16 +3926,18 @@ mod tests { .for_each(|disk_config| { let guest = Guest::new(*disk_config); - let mut child = GuestCommand::new(&guest) - .args(&["--cpus", "boot=1"]) + let mut cmd = GuestCommand::new(&guest); + cmd.args(&["--cpus", "boot=1"]) .args(&["--memory", "size=512M"]) .args(&["--kernel", guest.fw_path.as_str()]) .default_raw_disks() .default_net() - .args(&["--serial", "tty", "--console", "off"]) - .capture_output() - .spawn() - .unwrap(); + .capture_output(); + + #[cfg(target_arch = "aarch64")] + cmd.args(&["--cmdline", DIRECT_KERNEL_BOOT_CMDLINE]); + + let mut child = cmd.spawn().unwrap(); let r = std::panic::catch_unwind(|| { guest.wait_vm_boot(Some(120)).unwrap();