From 6f47e45c67ad6a6b1a86ad631cd985c7301fed61 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Thu, 22 Apr 2021 16:26:25 +0200 Subject: [PATCH] test: configure swap for TEST-55-OOMD oomd works way better with swap, so let's make the test less flaky by configuring a swap device for it. This also allows us to drop the ugly `cat`s from the load-generating script. --- test/TEST-55-OOMD/test.sh | 13 +++++++++++++ test/units/testsuite-55-slowgrowth.sh | 6 ++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/test/TEST-55-OOMD/test.sh b/test/TEST-55-OOMD/test.sh index afc6706e32f..9f7a11aea46 100755 --- a/test/TEST-55-OOMD/test.sh +++ b/test/TEST-55-OOMD/test.sh @@ -2,10 +2,23 @@ set -e TEST_DESCRIPTION="systemd-oomd Memory Pressure Test" +IMAGE_NAME="oomd" # shellcheck source=test/test-functions . "${TEST_BASE_DIR:?}/test-functions" +test_append_files() { + # Create a swap device + ( + mkswap "${LOOPDEV:?}p2" + dracut_install swapon swapoff + + cat >>"${initdir:?}/etc/fstab" <