Skip to content

Commit c139a76

Browse files
Swchexitroypat
authored andcommitted
test: extend test_max_devices to support aarch64
The test_max_devices test verifies the maximum number of devices that can be attached, as permitted by the platform. It checks both that the expected number of devices can be successfully attached and that attaching more than the limit results in a failure. Previously, this test was only executed on x86_64, where 18 devices are expected. This update extends the test to run on aarch64 as well, which supports up to 94 devices. Signed-off-by: Sheng-Wei (Way) Chen <[email protected]>
1 parent 4f50745 commit c139a76

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ and this project adheres to
4040
- [#5260](https://github.com/firecracker-microvm/firecracker/pull/5260): Fixed a
4141
bug allowing the block device to starve all other devices when backed by a
4242
sufficiently slow drive.
43+
- [#4207](https://github.com/firecracker-microvm/firecracker/issues/4207): Fixed
44+
GSI numbering on aarch64 to correctly allow up to 96 devices being attached
45+
simultaneously.
4346

4447
## [1.12.0]
4548

tests/integration_tests/functional/test_max_devices.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66

77
import pytest
88

9-
# IRQs are available from 5 to 23. We always use one IRQ for VMGenID device, so
10-
# the maximum number of devices supported at the same time is 18.
11-
MAX_DEVICES_ATTACHED = 18
9+
# On x86_64, IRQs are available from 5 to 23. We always use one IRQ for VMGenID
10+
# device, so the maximum number of devices supported at the same time is 18.
1211

12+
# On aarch64, IRQs are available from 32 to 127. We always use one IRQ each for
13+
# the VMGenID and RTC devices, so the maximum number of devices supported
14+
# at the same time is 94.
15+
MAX_DEVICES_ATTACHED = {
16+
"x86_64": 18,
17+
"aarch64": 94
18+
}.get(platform.machine())
1319

14-
@pytest.mark.skipif(
15-
platform.machine() != "x86_64", reason="Firecracker supports 24 IRQs on x86_64."
16-
)
1720
def test_attach_maximum_devices(uvm_plain_any):
1821
"""
1922
Test attaching maximum number of devices to the microVM.
@@ -36,9 +39,6 @@ def test_attach_maximum_devices(uvm_plain_any):
3639
test_microvm.ssh_iface(i).check_output("sync")
3740

3841

39-
@pytest.mark.skipif(
40-
platform.machine() != "x86_64", reason="Firecracker supports 24 IRQs on x86_64."
41-
)
4242
def test_attach_too_many_devices(uvm_plain):
4343
"""
4444
Test attaching to a microVM more devices than available IRQs.

0 commit comments

Comments
 (0)