From: Luca Boccassi Date: Fri, 23 Jun 2023 22:19:31 +0000 (+0100) Subject: TEST-55-OOMD: use swap file instead of partition X-Git-Tag: v254-rc1~112^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F28064%2Fhead;p=thirdparty%2Fsystemd.git TEST-55-OOMD: use swap file instead of partition The partition seems not to work on Ubuntu for some reason, use a swap file instead --- diff --git a/test/TEST-55-OOMD/test.sh b/test/TEST-55-OOMD/test.sh index 723e80d1158..64e2360b081 100755 --- a/test/TEST-55-OOMD/test.sh +++ b/test/TEST-55-OOMD/test.sh @@ -5,20 +5,19 @@ set -e TEST_DESCRIPTION="systemd-oomd Memory Pressure Test" IMAGE_NAME="oomd" +# Need to set up swap +TEST_NO_NSPAWN=1 + # shellcheck source=test/test-functions . "${TEST_BASE_DIR:?}/test-functions" test_append_files() { - # Create a swap device + # Create a swap file ( - mkswap "${LOOPDEV:?}p2" - image_install swapon swapoff - - inst_binary stress + image_install mkswap swapon swapoff stress - cat >>"${initdir:?}/etc/fstab" <>"${initdir:?}/etc/systemd/system/init.scope.d/test-55-oomd.conf" </run/systemd/oomd.conf.d/99-oomd-test.conf <