From 1b0cf0366814f3ec103d669ed151bc5b3a144563 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Wed, 14 Feb 2024 11:48:56 +0100 Subject: [PATCH] test: use btrfs' mkswapfile on btrfs So it's created automagically with proper attributes. --- test/TEST-55-OOMD/test.sh | 4 +--- test/units/testsuite-55.sh | 9 ++++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/test/TEST-55-OOMD/test.sh b/test/TEST-55-OOMD/test.sh index 64e2360b081..9a9cdecf70e 100755 --- a/test/TEST-55-OOMD/test.sh +++ b/test/TEST-55-OOMD/test.sh @@ -15,9 +15,7 @@ test_append_files() { # Create a swap file ( image_install mkswap swapon swapoff stress - - dd if=/dev/zero of="${initdir:?}/swapfile" bs=1M count=48 - chmod 0600 "${initdir:?}/swapfile" + image_install -o btrfs mkdir -p "${initdir:?}/etc/systemd/system/init.scope.d/" cat >>"${initdir:?}/etc/systemd/system/init.scope.d/test-55-oomd.conf" <