Skip to content

Commit

Permalink
fix(test): avoid running ssh after exhausting memory
Browse files Browse the repository at this point in the history
In test_balloon.py::test_deflate_on_oom we are exhausting the memory of
the microVM trying to trigger the OOM killer. This commit removes SSH
commands after launching the memory hogger inside the microVM, to avoid
hang connections due to the OOM killer killing sshd.

Signed-off-by: Babis Chalios <[email protected]>
  • Loading branch information
bchalios authored and pb8o committed Oct 6, 2023
1 parent fef6111 commit bfd8d26
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions tests/integration_tests/functional/test_balloon.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,7 @@ def make_guest_dirty_memory(ssh_connection, amount_mib=32):
logger.error("stdout: %s", stdout)
logger.error("stderr: %s", stderr)

cmd = "cat /tmp/fillmem_output.txt"
tries = 3
while tries > 0:
# it may take a bit of time to dirty the memory and the OOM to kick-in
time.sleep(0.5)
_, stdout, _ = ssh_connection.run(cmd)
if stdout != "":
break
tries -= 1
time.sleep(5)


def _test_rss_memory_lower(test_microvm, stable_delta=1):
Expand Down

0 comments on commit bfd8d26

Please sign in to comment.