Skip to content

Commit 4f3d8cd

Browse files
JackThomson2ShadowCurse
authored andcommitted
Update test_deflate_on_oom test
Updated the deflate on oom test to increase stability of the test. Making the balloon smaller and the allocation larger. Signed-off-by: Jack Thomson <[email protected]>
1 parent 579ff75 commit 4f3d8cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/integration_tests/functional/test_balloon.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ def test_deflate_on_oom(uvm_plain_any, deflate_on_oom):
200200

201201
# We get an initial reading of the RSS, then calculate the amount
202202
# we need to inflate the balloon with by subtracting it from the
203-
# VM size and adding an offset of 10 MiB in order to make sure we
203+
# VM size and adding an offset of 50 MiB in order to make sure we
204204
# get a lower reading than the initial one.
205205
initial_rss = get_stable_rss_mem_by_pid(firecracker_pid)
206-
inflate_size = 256 - int(initial_rss / 1024) + 10
206+
inflate_size = 256 - (int(initial_rss / 1024) + 50)
207207

208208
# Inflate the balloon
209209
test_microvm.api.balloon.patch(amount_mib=inflate_size)
@@ -213,7 +213,7 @@ def test_deflate_on_oom(uvm_plain_any, deflate_on_oom):
213213
# Check that using memory leads to the balloon device automatically
214214
# deflate (or not).
215215
balloon_size_before = test_microvm.api.balloon_stats.get().json()["actual_mib"]
216-
make_guest_dirty_memory(test_microvm.ssh, 64)
216+
make_guest_dirty_memory(test_microvm.ssh, 128)
217217

218218
balloon_size_after = test_microvm.api.balloon_stats.get().json()["actual_mib"]
219219
print(f"size before: {balloon_size_before} size after: {balloon_size_after}")

0 commit comments

Comments
 (0)