From: Frantisek Sumsal Date: Thu, 22 Apr 2021 14:26:25 +0000 (+0200) Subject: test: configure swap for TEST-55-OOMD X-Git-Tag: v249-rc1~352 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6f47e45c67ad6a6b1a86ad631cd985c7301fed61;p=thirdparty%2Fsystemd.git 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. --- 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" <