]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-55-OOMD: swapoff before adding new swapfile
authorRichard Maw <richard.maw@codethink.co.uk>
Mon, 19 Feb 2024 17:28:00 +0000 (17:28 +0000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 6 May 2024 09:57:09 +0000 (11:57 +0200)
When running test images built with read-only /usr
a swap partition is likely so needs to be turned off first.

test/units/testsuite-55.sh

index e5d930175f7da1fc9a79b11946ea5f7dbf154ec8..e803ea89c431a593f10c9702f7a59974fd9004cf 100755 (executable)
@@ -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