From 6cd6d89469da4340aae8b51600df8027186c49c5 Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
Date: Fri, 16 Feb 2024 13:53:01 +0100
Subject: [PATCH 0323/1160] test: "modernize" TEST-55-OOMD's init
(cherry picked from commit 7e2bf4c5ee871f797c853d8b6474d4d379dad8e2)
test/TEST-55-OOMD/test.sh | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
@@ -12,18 +12,17 @@ TEST_NO_NSPAWN=1
. "${TEST_BASE_DIR:?}/test-functions"
test_append_files() {
- # Create a swap file
- (
- image_install mkswap swapon swapoff stress
- image_install -o btrfs
+ local workspace="${1:?}"
- mkdir -p "${initdir:?}/etc/systemd/system/init.scope.d/"
- cat >>"${initdir:?}/etc/systemd/system/init.scope.d/test-55-oomd.conf" <<EOF
+ image_install mkswap swapon swapoff stress
+ image_install -o btrfs
+
+ mkdir -p "${workspace:?}/etc/systemd/system/init.scope.d/"
+ cat >"${workspace:?}/etc/systemd/system/init.scope.d/test-55-oomd.conf" <<EOF
[Scope]
MemoryHigh=infinity
StartupMemoryHigh=10G
EOF
- )
}
do_test "$@" 55
--
2.33.0