summaryrefslogtreecommitdiffstats
path: root/test/units
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtest/units/testsuite-55.sh7
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