From 341a4558fec0bce9facf606c11a32e2a55e1f3d2 Mon Sep 17 00:00:00 2001 From: Ruslan Mstoi Date: Fri, 24 Nov 2023 18:43:02 +0200 Subject: [PATCH] tests: test_vdpa_block: fix false positive Running on host where vdpa_sim_blk module is not correctly loaded test_vdpa_block passes. "test common_parallel::test_vdpa_block ... ok" This commit fixes the vdpa_sim_blk test to fail in that case. Signed-off-by: Ruslan Mstoi --- tests/integration.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index a7cae2604..8f12111d0 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -6869,9 +6869,7 @@ mod common_parallel { #[cfg(target_arch = "x86_64")] fn test_vdpa_block() { // Before trying to run the test, verify the vdpa_sim_blk module is correctly loaded. - if !exec_host_command_status("lsmod | grep vdpa_sim_blk").success() { - return; - } + assert!(exec_host_command_status("lsmod | grep vdpa_sim_blk").success()); let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string()); let guest = Guest::new(Box::new(focal));