From b8bd5796547c159d0482047b0401c20d95648525 Mon Sep 17 00:00:00 2001 From: Takahiro Itazuri Date: Fri, 6 Dec 2024 07:45:57 +0000 Subject: [PATCH] test: Remove test_max_cpus.py test_max_cpus.py tests vCPUs are online only on a microVM without CPU templates, which is now covered as part of test_all_vcpus_online(). Remove the test and use the maximum number of vCPUs in the new tests. Signed-off-by: Takahiro Itazuri --- .../{test_cpu_multiple.py => test_cpu_all.py} | 7 ++++++ .../functional/test_max_vcpus.py | 23 ------------------- 2 files changed, 7 insertions(+), 23 deletions(-) rename tests/integration_tests/functional/{test_cpu_multiple.py => test_cpu_all.py} (87%) delete mode 100644 tests/integration_tests/functional/test_max_vcpus.py diff --git a/tests/integration_tests/functional/test_cpu_multiple.py b/tests/integration_tests/functional/test_cpu_all.py similarity index 87% rename from tests/integration_tests/functional/test_cpu_multiple.py rename to tests/integration_tests/functional/test_cpu_all.py index 35b52e2a938..feb15bbde06 100644 --- a/tests/integration_tests/functional/test_cpu_multiple.py +++ b/tests/integration_tests/functional/test_cpu_all.py @@ -9,9 +9,15 @@ are operating identically, except for the expected differences. """ +import pytest + from framework.properties import global_props +# Use the maximum number of vCPUs supported by Firecracker +MAX_VCPUS = 32 + +@pytest.mark.parametrize("vcpu_count", [MAX_VCPUS]) def test_all_vcpus_online(uvm_any): """Check all vCPUs are online inside guest""" assert ( @@ -20,6 +26,7 @@ def test_all_vcpus_online(uvm_any): ) +@pytest.mark.parametrize("vcpu_count", [MAX_VCPUS]) def test_all_vcpus_have_same_features(uvm_any): """ Check all vCPUs have the same features inside guest. diff --git a/tests/integration_tests/functional/test_max_vcpus.py b/tests/integration_tests/functional/test_max_vcpus.py deleted file mode 100644 index 05c1f3c51ff..00000000000 --- a/tests/integration_tests/functional/test_max_vcpus.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -# SPDX-License-Identifier: Apache-2.0 -"""Tests scenario for microvms with max vcpus(32).""" - -MAX_VCPUS = 32 - - -def test_max_vcpus(uvm_plain): - """ - Test if all configured guest vcpus are online. - """ - microvm = uvm_plain - microvm.spawn() - - # Configure a microVM with 32 vCPUs. - microvm.basic_config(vcpu_count=MAX_VCPUS) - microvm.add_net_iface() - microvm.start() - - cmd = "nproc" - _, stdout, stderr = microvm.ssh.run(cmd) - assert stderr == "" - assert int(stdout) == MAX_VCPUS