TEST-55-OOMD: swapoff before adding new swapfile

When running test images built with read-only /usr
a swap partition is likely so needs to be turned off first.
This commit is contained in:
Richard Maw 2024-02-19 17:28:00 +00:00 committed by Daan De Meyer
parent f1d3962e61
commit 9be49de41f

View file

@ -23,6 +23,7 @@ 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
swapoff --all
if [[ "$(findmnt -n -o FSTYPE /)" == btrfs ]]; then
btrfs filesystem mkswapfile -s 64M /swapfile
else