mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-10 00:58:20 +03:00
test: "modernize" TEST-55-OOMD's init
(cherry picked from commit 7e2bf4c5ee871f797c853d8b6474d4d379dad8e2) (cherry picked from commit 6cd6d89469da4340aae8b51600df8027186c49c5) (cherry picked from commit 03efc2b9295f71f6b6e7fc894787f9206119ec89)
This commit is contained in:
parent
eb09475e71
commit
3b21fe1894
@ -12,17 +12,16 @@ 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=10G
|
||||
EOF
|
||||
)
|
||||
}
|
||||
|
||||
do_test "$@" 55
|
||||
|
Loading…
x
Reference in New Issue
Block a user