diff --git a/tests/integration_tests/functional/test_kvm_ptp.py b/tests/integration_tests/functional/test_kvm_ptp.py index 70b5bb877bc..4b44ca124eb 100644 --- a/tests/integration_tests/functional/test_kvm_ptp.py +++ b/tests/integration_tests/functional/test_kvm_ptp.py @@ -6,19 +6,18 @@ import pytest -def test_kvm_ptp(uvm_plain_any): +def test_kvm_ptp(uvm_any_booted): """Test kvm_ptp is usable""" - vm = uvm_plain_any + vm = uvm_any_booted if vm.guest_kernel_version[:2] < (6, 1): pytest.skip("Only supported in kernel 6.1 and after") - vm.spawn() - vm.basic_config(vcpu_count=2, mem_size_mib=256) - vm.add_net_iface() - vm.start() + _, dmesg, _ = vm.ssh.check_output("dmesg |grep -i ptp") + assert "PTP clock support registered" in dmesg - vm.ssh.check_output("[ -c /dev/ptp0 ]") + # wait up to 5s to see the PTP device + vm.ssh.check_output("udevadm wait -t 5 /dev/ptp0") # phc_ctl[14515.127]: clock time is 1697545854.728335694 or Tue Oct 17 12:30:54 2023 vm.ssh.check_output("phc_ctl /dev/ptp0 -- get")