1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-10 05:18:17 +03:00

test: delete /swapfile after swapoff

[   23.608342] TEST-55-OOMD.sh[689]: + btrfs filesystem mkswapfile -s 64M /swapfile
[   23.651930] TEST-55-OOMD.sh[704]: ERROR: cannot create new swapfile: File exists
This commit is contained in:
Luca Boccassi 2024-11-05 18:15:36 +00:00 committed by Yu Watanabe
parent 57feaaece3
commit 78b032d727

View File

@ -24,6 +24,7 @@ fi
# Activate swap file if we are in a VM
if systemd-detect-virt --vm --quiet; then
swapoff --all
rm -f /swapfile
if [[ "$(findmnt -n -o FSTYPE /)" == btrfs ]]; then
btrfs filesystem mkswapfile -s 64M /swapfile
else