Skip to content

Commit 427b34d

Browse files
roypatbchalios
authored andcommitted
test: Add missing wait_for_ups to balloon tests
Some of the tests in test_balloon.py were missing `microvm.wait_for_up()` calls. This was mainly visible from those that read the RSS of the firecracker process taking a long time to calibrate, due to RSS being very unstable during guest boot up. Signed-off-by: Patrick Roy <[email protected]>
1 parent 95980ce commit 427b34d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/integration_tests/functional/test_balloon.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def test_rss_memory_lower(uvm_plain_any):
129129

130130
# Start the microvm.
131131
test_microvm.start()
132+
test_microvm.wait_for_up()
132133

133134
_test_rss_memory_lower(test_microvm)
134135

@@ -150,6 +151,7 @@ def test_inflate_reduces_free(uvm_plain_any):
150151

151152
# Start the microvm
152153
test_microvm.start()
154+
test_microvm.wait_for_up()
153155
firecracker_pid = test_microvm.firecracker_pid
154156

155157
# Get the free memory before ballooning.
@@ -301,6 +303,7 @@ def test_size_reduction(uvm_plain_any):
301303

302304
# Start the microvm.
303305
test_microvm.start()
306+
test_microvm.wait_for_up()
304307
firecracker_pid = test_microvm.firecracker_pid
305308

306309
# Check memory usage.
@@ -343,6 +346,7 @@ def test_stats(uvm_plain_any):
343346

344347
# Start the microvm.
345348
test_microvm.start()
349+
test_microvm.wait_for_up()
346350
firecracker_pid = test_microvm.firecracker_pid
347351

348352
# Get an initial reading of the stats.
@@ -403,6 +407,7 @@ def test_stats_update(uvm_plain_any):
403407

404408
# Start the microvm.
405409
test_microvm.start()
410+
test_microvm.wait_for_up()
406411
firecracker_pid = test_microvm.firecracker_pid
407412

408413
# Dirty 30MB of pages.
@@ -454,6 +459,7 @@ def test_balloon_snapshot(microvm_factory, guest_kernel, rootfs):
454459
)
455460

456461
vm.start()
462+
vm.wait_for_up()
457463

458464
# Dirty 60MB of pages.
459465
make_guest_dirty_memory(vm.ssh, amount_mib=60)
@@ -533,6 +539,7 @@ def test_memory_scrub(microvm_factory, guest_kernel, rootfs):
533539
)
534540

535541
microvm.start()
542+
microvm.wait_for_up()
536543

537544
# Dirty 60MB of pages.
538545
make_guest_dirty_memory(microvm.ssh, amount_mib=60)

0 commit comments

Comments
 (0)