diff options
author | Luca Boccassi <bluca@debian.org> | 2023-06-24 00:19:31 +0200 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2023-06-24 12:48:51 +0200 |
commit | f434f182ccfd17a214e4b07cec033318e6c4f7b2 (patch) | |
tree | 7cd717afb0c6de29b7e9672c666a9dfce70d0a0b /test/units/testsuite-55.sh | |
parent | TEST-55-OOMD: use 'stress' to create high pressure (diff) | |
download | systemd-f434f182ccfd17a214e4b07cec033318e6c4f7b2.tar.xz systemd-f434f182ccfd17a214e4b07cec033318e6c4f7b2.zip |
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
Diffstat (limited to '')
-rwxr-xr-x | test/units/testsuite-55.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/units/testsuite-55.sh b/test/units/testsuite-55.sh index 85ebb76732..838ba3a6a0 100755 --- a/test/units/testsuite-55.sh +++ b/test/units/testsuite-55.sh @@ -24,6 +24,13 @@ fi rm -rf /run/systemd/system/testsuite-55-testbloat.service.d +# Activate swap file if we are in a VM +if systemd-detect-virt --vm --quiet; then + mkswap /swapfile + swapon /swapfile + swapon --show +fi + # Configure oomd explicitly to avoid conflicts with distro dropins mkdir -p /run/systemd/oomd.conf.d/ cat >/run/systemd/oomd.conf.d/99-oomd-test.conf <<EOF |