diff --git a/tests/integration_tests/functional/test_pvtime.py b/tests/integration_tests/functional/test_pvtime.py new file mode 100644 index 00000000000..c71ae14a518 --- /dev/null +++ b/tests/integration_tests/functional/test_pvtime.py @@ -0,0 +1,27 @@ +# Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + +"""Tests for verifying the PVTime device is enabled on aarch64.""" + +import pytest + +from framework.properties import global_props + + +@pytest.mark.skipif( + global_props.cpu_architecture != "aarch64", reason="Only run in aarch64" +) +def test_guest_has_pvtime_enabled(uvm_plain): + """ + Check that the guest kernel has enabled PV steal time. + """ + vm = uvm_plain + vm.spawn() + vm.basic_config() + vm.add_net_iface() + vm.start() + + _, stdout, _ = vm.ssh.run("dmesg | grep 'stolen time PV'") + assert ( + "stolen time PV" in stdout + ), "Guest kernel did not report PV steal time enabled" diff --git a/tests/integration_tests/functional/test_steal_time.py b/tests/integration_tests/performance/test_steal_time.py similarity index 81% rename from tests/integration_tests/functional/test_steal_time.py rename to tests/integration_tests/performance/test_steal_time.py index 8653cf3f8ec..a3bad923b3a 100644 --- a/tests/integration_tests/functional/test_steal_time.py +++ b/tests/integration_tests/performance/test_steal_time.py @@ -1,14 +1,10 @@ # Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 -"""Tests for verifying the PVTime device behavior under contention and across snapshots.""" +"""Tests for verifying the steal time behavior under contention and across snapshots.""" import time -import pytest - -from framework.properties import global_props - def get_steal_time_ms(vm): """Returns total steal time of vCPUs in VM in milliseconds""" @@ -18,25 +14,6 @@ def get_steal_time_ms(vm): return steal_time_tck / clk_tck * 1000 -@pytest.mark.skipif( - global_props.cpu_architecture != "aarch64", reason="Only run in aarch64" -) -def test_guest_has_pvtime_enabled(uvm_plain): - """ - Check that the guest kernel has enabled PV steal time. - """ - vm = uvm_plain - vm.spawn() - vm.basic_config() - vm.add_net_iface() - vm.start() - - _, stdout, _ = vm.ssh.run("dmesg | grep 'stolen time PV'") - assert ( - "stolen time PV" in stdout - ), "Guest kernel did not report PV steal time enabled" - - def test_pvtime_steal_time_increases(uvm_plain): """ Test that PVTime steal time increases when both vCPUs are contended on the same pCPU.