public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 5/6] xfs/217: prevent enospc failures on small test devices
Date: Mon, 24 Feb 2014 14:06:14 +1100	[thread overview]
Message-ID: <1393211175-30016-6-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1393211175-30016-1-git-send-email-david@fromorbit.com>

From: Dave Chinner <dchinner@redhat.com>

I'm running xfstests against a ramdisk, so I'm limited in size of
the test and scratch devices. While there are large enough to hold a
filesystem image with a 2GB log, the way the log changes position in
an image file as the size of the filesystem increases means that the
aggregated disk space of xfs/217 is more than enough to run a 4GB
TEST_DEV out of space and hence fail the test.

To avoid this problem, punch out the image file between every mkfs
iteration so that it only consumes the space needed by each
individual mkfs tests, not an aggregation of them all.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 tests/xfs/217 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/xfs/217 b/tests/xfs/217
index 6c439c0..ab55a30 100755
--- a/tests/xfs/217
+++ b/tests/xfs/217
@@ -63,6 +63,10 @@ _do_mkfs()
 		mount -o loop -t xfs $LOOP_DEV $LOOP_MNT
 		echo "test write" > $LOOP_MNT/test
 		umount -d $LOOP_MNT > /dev/null 2>&1
+
+		# punch out the previous blocks so that we keep the amount of
+		# disk space the test requires down to a minimum.
+		$XFS_IO_PROG -f -c "unresvsp 0 16383g" $LOOP_DEV
 	done
 }
 # make large holey file
-- 
1.8.4.rc3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2014-02-24  3:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24  3:06 [PATCH 0/6] xfstests: fixes for CRCs and small devices Dave Chinner
2014-02-24  3:06 ` [PATCH 1/6] xfs/033: add golden output for CRC enabled filesystems Dave Chinner
2014-02-25 22:05   ` Christoph Hellwig
2014-02-24  3:06 ` [PATCH 2/6] xfs/189: noattr2 invalid " Dave Chinner
2014-02-25 22:05   ` Christoph Hellwig
2014-02-24  3:06 ` [PATCH 3/6] generic/003: ensure time changes between stat calls Dave Chinner
2014-02-25 22:06   ` Christoph Hellwig
2014-02-24  3:06 ` [PATCH 4/6] shared/051: CRC enabled filesystems handle more than 25 ACLs Dave Chinner
2014-02-25 22:09   ` Christoph Hellwig
2014-02-24  3:06 ` Dave Chinner [this message]
2014-02-25 22:09   ` [PATCH 5/6] xfs/217: prevent enospc failures on small test devices Christoph Hellwig
2014-02-24  3:06 ` [PATCH 6/6] xfs/167: need at least 10GB of scratch space to run Dave Chinner
2014-02-25 22:10   ` Christoph Hellwig

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=1393211175-30016-6-git-send-email-david@fromorbit.com \
    --to=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /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