All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH V2] xfstests shared/298: various fixes
Date: Tue, 30 Apr 2013 11:46:00 -0500	[thread overview]
Message-ID: <517FF548.1010309@sandeen.net> (raw)
In-Reply-To: <517AE12C.2050902@redhat.com>

fix shared/298:

* don't include common/config, not needed and breaks
  stuff when $SCRATCH_DEV_POOL is defined:
    Error: $SCRATCH_DEV should be unset when $SCRATCH_DEV_POOL is set
* make sure xfs_io has fiemap, we'll need it
* add -F to the xfs_io invocation, again, for use on
  old xfsprogs on non-xfs filesystems
* ignore ENOSPC errors from "garbage" loop; the only goal
  is to fill it, ENOSPC doesn't matter.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

V2: break out of copy loop when full

diff --git a/tests/shared/298 b/tests/shared/298
index f1a3432..4541798 100755
--- a/tests/shared/298
+++ b/tests/shared/298
@@ -28,12 +28,12 @@ echo "QA output created by $seq"
 status=1	# failure is the default!
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
-. common/config
-. common/rc
+. ./common/rc
 
 _supported_fs ext4 xfs
 _supported_os Linux
 _require_fstrim
+_require_xfs_io_fiemap
 _require_fs_space $TEST_DIR 307200
 [ "$FSTYP" = "ext4" ] && _require_dumpe2fs
 
@@ -49,7 +49,7 @@ _cleanup()
 
 get_holes()
 {
-	$XFS_IO_PROG -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
+	$XFS_IO_PROG -F -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/'
 }
 
 get_free_sectors()
@@ -136,9 +136,10 @@ $MKFS_PROG -t $FSTYP $MKFS_OPTIONS $loop_dev &> /dev/null
 $MOUNT_PROG $loop_dev $loop_mnt
 
 echo -n "Generating garbage on loop..."
+# Goal is to fill it up, ignore any errors.
 for i in `seq 1 10`; do
-	mkdir $loop_mnt/$i
-	cp -r $here/* $loop_mnt/$i
+	mkdir $loop_mnt/$i &> /dev/null
+	cp -r $here/* $loop_mnt/$i &> /dev/null || break
 done
 
 # Get reference fiemap, this can contain i.e. uninitialized inode table


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

  parent reply	other threads:[~2013-04-30 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26 20:18 [PATCH] xfstests shared/298: various fixes Eric Sandeen
2013-04-30  7:43 ` Dave Chinner
2013-04-30 14:17   ` Eric Sandeen
2013-04-30 16:46 ` Eric Sandeen [this message]
2013-05-03 13:00   ` [PATCH V2] " Rich Johnston
2013-05-14 18:15   ` Rich Johnston
2013-05-14 18:18   ` Rich Johnston

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=517FF548.1010309@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=sandeen@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.