@@ -95,12 +95,12 @@ def to_ms(v, unit):
9595
9696
9797def launch_vm_with_boot_timer (
98- microvm_factory , guest_kernel_acpi , rootfs_rw , vcpu_count , mem_size_mib
98+ microvm_factory , guest_kernel_acpi , rootfs_rw , vcpu_count , mem_size_mib , pci_enabled
9999):
100100 """Launches a microVM with guest-timer and returns the reported metrics for it"""
101101 vm = microvm_factory .build (guest_kernel_acpi , rootfs_rw )
102102 vm .jailer .extra_args .update ({"boot-timer" : None })
103- vm .spawn ()
103+ vm .spawn (pci = pci_enabled )
104104 vm .basic_config (
105105 vcpu_count = vcpu_count ,
106106 mem_size_mib = mem_size_mib ,
@@ -116,9 +116,11 @@ def launch_vm_with_boot_timer(
116116 return (vm , boot_time_us , cpu_boot_time_us )
117117
118118
119- def test_boot_timer (microvm_factory , guest_kernel_acpi , rootfs ):
119+ def test_boot_timer (microvm_factory , guest_kernel_acpi , rootfs , pci_enabled ):
120120 """Tests that the boot timer device works"""
121- launch_vm_with_boot_timer (microvm_factory , guest_kernel_acpi , rootfs , 1 , 128 )
121+ launch_vm_with_boot_timer (
122+ microvm_factory , guest_kernel_acpi , rootfs , 1 , 128 , pci_enabled
123+ )
122124
123125
124126@pytest .mark .parametrize (
@@ -127,13 +129,24 @@ def test_boot_timer(microvm_factory, guest_kernel_acpi, rootfs):
127129)
128130@pytest .mark .nonci
129131def test_boottime (
130- microvm_factory , guest_kernel_acpi , rootfs_rw , vcpu_count , mem_size_mib , metrics
132+ microvm_factory ,
133+ guest_kernel_acpi ,
134+ rootfs_rw ,
135+ vcpu_count ,
136+ mem_size_mib ,
137+ pci_enabled ,
138+ metrics ,
131139):
132140 """Test boot time with different guest configurations"""
133141
134142 for i in range (10 ):
135143 vm , boot_time_us , cpu_boot_time_us = launch_vm_with_boot_timer (
136- microvm_factory , guest_kernel_acpi , rootfs_rw , vcpu_count , mem_size_mib
144+ microvm_factory ,
145+ guest_kernel_acpi ,
146+ rootfs_rw ,
147+ vcpu_count ,
148+ mem_size_mib ,
149+ pci_enabled ,
137150 )
138151
139152 if i == 0 :
0 commit comments