1#!/usr/bin/env bash 2# SPDX-License-Identifier: LGPL-2.1-or-later 3set -e 4 5TEST_DESCRIPTION="systemd-oomd Memory Pressure Test" 6IMAGE_NAME="oomd" 7 8# shellcheck source=test/test-functions 9. "${TEST_BASE_DIR:?}/test-functions" 10 11test_append_files() { 12 # Create a swap device 13 ( 14 mkswap "${LOOPDEV:?}p2" 15 image_install swapon swapoff 16 17 cat >>"${initdir:?}/etc/fstab" <<EOF 18UUID=$(blkid -o value -s UUID "${LOOPDEV}p2") none swap defaults 0 0 19EOF 20 ) 21} 22 23do_test "$@" 55 24