systemd/test/TEST-55-OOMD/test.sh
Frantisek Sumsal 39e1753673 test: rename dracut_install to image_install
The `dracut_install` is a misnomer, since the systemd integration test
suite is based on the original dracut's test suite, and not all the
references to dracut has been edited out. Let's fix that.
2021-09-08 22:41:20 +09:00

23 lines
456 B
Bash
Executable file

#!/usr/bin/env bash
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"
image_install swapon swapoff
cat >>"${initdir:?}/etc/fstab" <<EOF
UUID=$(blkid -o value -s UUID "${LOOPDEV}p2") none swap defaults 0 0
EOF
)
}
do_test "$@" 55