From 719c9b8233d62499d604f1c33c5286d8e2dd2c5d Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 13 Apr 2022 12:38:14 +0100 Subject: [PATCH] tests: Fix aarch64 clippy issues in integration tests Signed-off-by: Rob Bradford --- tests/integration.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index ca214d3eb..6ab642fe4 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -8,6 +8,7 @@ // related warnings for our quality workflow to pass. #![allow(dead_code)] +#[cfg(target_arch = "x86_64")] #[macro_use] extern crate lazy_static; @@ -417,7 +418,7 @@ enum FwType { RustHypervisorFirmware, } -fn fw_path(fw_type: FwType) -> String { +fn fw_path(_fw_type: FwType) -> String { let mut workload_path = dirs::home_dir().unwrap(); workload_path.push("workloads"); @@ -426,7 +427,7 @@ fn fw_path(fw_type: FwType) -> String { fw_path.push("CLOUDHV_EFI.fd"); #[cfg(target_arch = "x86_64")] { - match fw_type { + match _fw_type { FwType::Ovmf => fw_path.push(OVMF_NAME), FwType::RustHypervisorFirmware => fw_path.push("hypervisor-fw"), } @@ -7501,14 +7502,15 @@ mod live_migration { let r = std::panic::catch_unwind(|| { // Perform same checks to validate VM has been properly migrated assert_eq!(guest.get_cpu_count().unwrap_or_default(), 6); + #[cfg(target_arch = "x86_64")] if numa { - #[cfg(target_arch = "x86_64")] assert!(guest.get_total_memory().unwrap_or_default() > 6_720_000); - #[cfg(target_arch = "aarch64")] - assert!(guest.get_total_memory().unwrap_or_default() > 3_840_000); } else { assert!(guest.get_total_memory().unwrap_or_default() > 3_840_000); } + #[cfg(target_arch = "aarch64")] + assert!(guest.get_total_memory().unwrap_or_default() > 3_840_000); + guest.check_devices_common(None, Some(&console_text)); // Perform NUMA related checks