From: Anand Jain <anand.jain@oracle.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: [PATCH 1/2] fstests: btrfs/177 check for minsize of the scratch device
Date: Mon, 9 Mar 2020 19:40:35 +0800 [thread overview]
Message-ID: <20200309114036.5266-2-anand.jain@oracle.com> (raw)
In-Reply-To: <20200309114036.5266-1-anand.jain@oracle.com>
This test case needs at least 3g scratch device space, check for it
before starting the test case.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
tests/btrfs/177 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/btrfs/177 b/tests/btrfs/177
index 2b2c2fcc2198..a627c2ab1666 100755
--- a/tests/btrfs/177
+++ b/tests/btrfs/177
@@ -34,6 +34,11 @@ _require_scratch_swapfile
swapfile="$SCRATCH_MNT/swap"
+minsize=$((3 * 1024 * 1024 * 1024))
+devsize=$(blockdev --getsize64 $SCRATCH_DEV)
+[ "$devsize" -lt "$minsize" ] && \
+ _notrun "Scratch device $SCRATCH_DEV $devsize must be at least $minsize"
+
# First, create a 1GB filesystem and fill it up.
_scratch_mkfs_sized $((1024 * 1024 * 1024)) >> $seqres.full 2>&1
_scratch_mount
--
2.18.1
next prev parent reply other threads:[~2020-03-09 11:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 11:40 [PATCH 0/2] fstests: cleanup and fix btrfs/177 Anand Jain
2020-03-09 11:40 ` Anand Jain [this message]
2020-03-09 11:51 ` [PATCH 1/2] fstests: btrfs/177 check for minsize of the scratch device Nikolay Borisov
2020-03-10 4:20 ` [PATCH v2 " Anand Jain
2020-03-09 11:40 ` [PATCH 2/2] fstests: btrfs/177 fix for nodesize 64K and type single Anand Jain
2020-03-10 4:22 ` Anand Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200309114036.5266-2-anand.jain@oracle.com \
--to=anand.jain@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).