From 7cfb2139d071b2a8cd36cf13f571cccc188606b3 Mon Sep 17 00:00:00 2001 From: Michael Zhao Date: Thu, 10 Jun 2021 19:55:57 +0800 Subject: [PATCH] tests: Enable pty test case on AArch64 Signed-off-by: Michael Zhao --- tests/integration.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index ee7e69063..f0cfa0b2c 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -23,7 +23,6 @@ mod tests { use std::io; use std::io::BufRead; use std::io::Read; - #[cfg(target_arch = "x86_64")] use std::io::Write; use std::os::unix::io::AsRawFd; use std::path::PathBuf; @@ -3031,12 +3030,16 @@ mod tests { } #[test] - #[cfg(target_arch = "x86_64")] fn test_pty_interaction() { let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); let guest = Guest::new(Box::new(focal)); let api_socket = temp_api_path(&guest.tmp_dir); - let cmdline = DIRECT_KERNEL_BOOT_CMDLINE.to_owned() + " console=ttyS0"; + let serial_option = if cfg!(target_arch = "x86_64") { + " console=ttyS0" + } else { + " console=ttyAMA0" + }; + let cmdline = DIRECT_KERNEL_BOOT_CMDLINE.to_owned() + serial_option; let mut child = GuestCommand::new(&guest) .args(&["--cpus", "boot=1"])