Skip to content

Commit bc6e250

Browse files
Swchexitroypat
authored andcommitted
chore: increase VM memory to reliably pass test_max_devices on aarch64
Establishing 94 SSH connections exhausts the default 256 MiB memory of the `uvm_plain_machine` with `basic_config` previously used in tests `test_max_devices` on aarch64. Increase the VM's memory limit to 512 MiB to ensure stable and consistent test execution. Signed-off-by: Sheng-Wei (Way) Chen <[email protected]>
1 parent 53eaaeb commit bc6e250

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/integration_tests/functional/test_max_devices.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@
1717
"aarch64": 94
1818
}.get(platform.machine())
1919

20-
def test_attach_maximum_devices(uvm_plain_any):
20+
def test_attach_maximum_devices(microvm_factory, guest_kernel, rootfs):
2121
"""
2222
Test attaching maximum number of devices to the microVM.
2323
"""
24-
test_microvm = uvm_plain_any
24+
if MAX_DEVICES_ATTACHED is None:
25+
pytest.skip("Unsupported platform for this test.")
26+
27+
test_microvm = microvm_factory.build(guest_kernel, rootfs, monitor_memory=False)
2528
test_microvm.spawn()
2629

27-
# Set up a basic microVM.
28-
test_microvm.basic_config()
30+
# The default 256mib is not enough for 94 ssh connections on aarch64.
31+
test_microvm.basic_config(mem_size_mib=512)
2932

3033
# Add (`MAX_DEVICES_ATTACHED` - 1) devices because the rootfs
3134
# has already been configured in the `basic_config()`function.
@@ -43,6 +46,9 @@ def test_attach_too_many_devices(uvm_plain):
4346
"""
4447
Test attaching to a microVM more devices than available IRQs.
4548
"""
49+
if MAX_DEVICES_ATTACHED is None:
50+
pytest.skip("Unsupported platform for this test.")
51+
4652
test_microvm = uvm_plain
4753
test_microvm.spawn()
4854

0 commit comments

Comments
 (0)