From f434f182ccfd17a214e4b07cec033318e6c4f7b2 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 23 Jun 2023 23:19:31 +0100 Subject: [PATCH] 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 --- test/TEST-55-OOMD/test.sh | 15 +++++++-------- test/units/testsuite-55.sh | 7 +++++++ 2 files changed, 14 insertions(+), 8 deletions(-) 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 <