@@ -95,12 +95,12 @@ def to_ms(v, unit):
95
95
96
96
97
97
def 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
99
99
):
100
100
"""Launches a microVM with guest-timer and returns the reported metrics for it"""
101
101
vm = microvm_factory .build (guest_kernel_acpi , rootfs_rw )
102
102
vm .jailer .extra_args .update ({"boot-timer" : None })
103
- vm .spawn ()
103
+ vm .spawn (pci = pci_enabled )
104
104
vm .basic_config (
105
105
vcpu_count = vcpu_count ,
106
106
mem_size_mib = mem_size_mib ,
@@ -116,9 +116,11 @@ def launch_vm_with_boot_timer(
116
116
return (vm , boot_time_us , cpu_boot_time_us )
117
117
118
118
119
- def test_boot_timer (microvm_factory , guest_kernel_acpi , rootfs ):
119
+ def test_boot_timer (microvm_factory , guest_kernel_acpi , rootfs , pci_enabled ):
120
120
"""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
+ )
122
124
123
125
124
126
@pytest .mark .parametrize (
@@ -127,13 +129,24 @@ def test_boot_timer(microvm_factory, guest_kernel_acpi, rootfs):
127
129
)
128
130
@pytest .mark .nonci
129
131
def 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 ,
131
139
):
132
140
"""Test boot time with different guest configurations"""
133
141
134
142
for i in range (10 ):
135
143
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 ,
137
150
)
138
151
139
152
if i == 0 :
0 commit comments