Skip to content

Commit e8c9e1f

Browse files
committed
test: remove pci=off default from various parts in tests
We only pass pci=off if PCI is disabled in Firecracker. Adapt tests and comments to reflect that. Signed-off-by: Babis Chalios <[email protected]>
1 parent b548b0b commit e8c9e1f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

tests/framework/microvm.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,8 +784,10 @@ def basic_config(
784784
the response is within the interval [200, 300).
785785
786786
If boot_args is None, the default boot_args in Firecracker is
787-
reboot=k panic=1 pci=off nomodule 8250.nr_uarts=0
788-
i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd
787+
reboot=k panic=1 nomodule 8250.nr_uarts=0 i8042.noaux i8042.nomux
788+
i8042.nopnp i8042.dumbkbd
789+
790+
if PCI is disabled, Firecracker also passes to the guest pci=off
789791
790792
Reference: file:../../src/vmm/src/vmm_config/boot_source.rs::DEFAULT_KERNEL_CMDLINE
791793
"""

tests/integration_tests/performance/test_boottime.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# Regex for obtaining boot time from some string.
1212

1313
DEFAULT_BOOT_ARGS = (
14-
"reboot=k panic=1 pci=off nomodule 8250.nr_uarts=0"
14+
"reboot=k panic=1 nomodule 8250.nr_uarts=0"
1515
" i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd"
1616
)
1717

@@ -98,13 +98,14 @@ def launch_vm_with_boot_timer(
9898
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"""
101+
boot_args = DEFAULT_BOOT_ARGS if pci_enabled else DEFAULT_BOOT_ARGS + "pci=off"
101102
vm = microvm_factory.build(guest_kernel_acpi, rootfs_rw)
102103
vm.jailer.extra_args.update({"boot-timer": None})
103104
vm.spawn(pci=pci_enabled)
104105
vm.basic_config(
105106
vcpu_count=vcpu_count,
106107
mem_size_mib=mem_size_mib,
107-
boot_args=DEFAULT_BOOT_ARGS + " init=/usr/local/bin/init",
108+
boot_args=boot_args + " init=/usr/local/bin/init",
108109
enable_entropy_device=True,
109110
)
110111
vm.add_net_iface()

0 commit comments

Comments
 (0)