Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/platform_tests/test_memory_exhaustion.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ def test_memory_exhaustion(self, duthosts, enum_rand_one_per_hwsku_hostname, loc
# background process.
# * Some DUTs with few free memory may reboot before ansible receive the result of shell
# command, so we add `sleep 5` to ensure ansible receive the result first.
# Swapping is turned off so the OOM is triggered in a shorter time.

res = duthost.command("sudo swapoff -a")
logging.info(res)

cmd = 'nohup bash -c "sleep 5 && tail /dev/zero" &'
res = duthost.shell(cmd)
if not res.is_successful:
Expand Down