* [PATCH 0/4] xfsqa: make some tests work again, add xfs_fsr test
@ 2010-01-12 4:41 Dave Chinner
2010-01-12 4:41 ` [PATCH 1/4] xfsqa: filter the fsstress seed output in 104 Dave Chinner
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Dave Chinner @ 2010-01-12 4:41 UTC (permalink / raw)
To: xfs
Enable the growfs test 104 and filter out the useless output, remove
hacks from 073 to do with loop devices and filter the log size out
in 206 to prevent failures with new mkfs binaries that allow large
logs.
Also, add a simple xfs_fsr test to improve coverage in the test
suite. That's not hard given we have only one test (042) that
defragments only one file.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 1/4] xfsqa: filter the fsstress seed output in 104 2010-01-12 4:41 [PATCH 0/4] xfsqa: make some tests work again, add xfs_fsr test Dave Chinner @ 2010-01-12 4:41 ` Dave Chinner 2010-01-12 9:31 ` Christoph Hellwig 2010-01-12 4:41 ` [PATCH 2/4] xfsqa: make unmounting loop devices in 073 work again Dave Chinner ` (2 subsequent siblings) 3 siblings, 1 reply; 10+ messages in thread From: Dave Chinner @ 2010-01-12 4:41 UTC (permalink / raw) To: xfs Otherwise it fails to match the golden output. Also add the test to the auto group so that it is run regularly now that the growfs problems are fixed. Signed-off-by: Dave Chinner <david@fromorbit.com> --- 104 | 2 +- group | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/104 b/104 index 6dea1d3..5f18d08 100755 --- a/104 +++ b/104 @@ -60,7 +60,7 @@ _stress_scratch() procs=3 nops=1000 # -w ensures that the only ops are ones which cause write I/O - $FSSTRESS_PROG -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID & + $FSSTRESS_PROG -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID > /dev/null & } # real QA test starts here diff --git a/group b/group index 8d055a2..2c2e293 100644 --- a/group +++ b/group @@ -210,7 +210,7 @@ prealloc 101 udf 102 udf 103 metadata dir ioctl auto quick -104 growfs ioctl prealloc +104 growfs ioctl prealloc auto 105 acl auto quick 106 quota 107 quota -- 1.6.5 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] xfsqa: filter the fsstress seed output in 104 2010-01-12 4:41 ` [PATCH 1/4] xfsqa: filter the fsstress seed output in 104 Dave Chinner @ 2010-01-12 9:31 ` Christoph Hellwig 0 siblings, 0 replies; 10+ messages in thread From: Christoph Hellwig @ 2010-01-12 9:31 UTC (permalink / raw) To: Dave Chinner; +Cc: xfs On Tue, Jan 12, 2010 at 03:41:06PM +1100, Dave Chinner wrote: > Otherwise it fails to match the golden output. Also add > the test to the auto group so that it is run regularly now > that the growfs problems are fixed. Well, they're not actually fixed yet, Alex still needs to push out your patches to the xfs tree :) anyway, patch looks good, Reviewed-by: Christoph Hellwig <hch@lst.de> _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/4] xfsqa: make unmounting loop devices in 073 work again 2010-01-12 4:41 [PATCH 0/4] xfsqa: make some tests work again, add xfs_fsr test Dave Chinner 2010-01-12 4:41 ` [PATCH 1/4] xfsqa: filter the fsstress seed output in 104 Dave Chinner @ 2010-01-12 4:41 ` Dave Chinner 2010-01-12 10:00 ` Christoph Hellwig 2010-01-12 4:41 ` [PATCH 3/4] xfsqa: filter log size in 206 Dave Chinner 2010-01-12 4:41 ` [PATCH 4/4] xfsqa: add simple xfs_fsr test Dave Chinner 3 siblings, 1 reply; 10+ messages in thread From: Dave Chinner @ 2010-01-12 4:41 UTC (permalink / raw) To: xfs Loop devices are now created and destroyed on demand, and the existing hacks to do this no longer work. Remove them. Signed-off-by: Dave Chinner <david@fromorbit.com> --- 073 | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/073 b/073 index 5059448..ac4c64f 100755 --- a/073 +++ b/073 @@ -3,15 +3,6 @@ # # Test xfs_copy # -# HACK WARNING: -# -# Due to the severe brokenness of mount's handling of loopback devices, we -# hardcode the loop devices we use for this test. This enables us to clean up -# the pieces when we remount the loop device because mount loses all trace of -# the fact this is a loop device. Hence to enable us to unmount the hosting -# filesystem, we need to manually tear down the relevant loop device. If -# mount ever gets fixed then this hack can be removed. -# #----------------------------------------------------------------------- # Copyright (c) 2000-2003,2008 Silicon Graphics, Inc. All Rights Reserved. # @@ -127,9 +118,7 @@ _verify_copy() diff -u $tmp.geometry1 $tmp.geometry2 echo unmounting and removing new image - loop=`mount | grep $target | grep -o -e 'loop=.*[^),]' | grep -o -e '/.*$'` - umount $source $target - losetup -d $loop > /dev/null 2>&1 + umount $source_dir $target_dir rm -f $target } -- 1.6.5 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/4] xfsqa: make unmounting loop devices in 073 work again 2010-01-12 4:41 ` [PATCH 2/4] xfsqa: make unmounting loop devices in 073 work again Dave Chinner @ 2010-01-12 10:00 ` Christoph Hellwig 2010-01-12 11:51 ` Dave Chinner 0 siblings, 1 reply; 10+ messages in thread From: Christoph Hellwig @ 2010-01-12 10:00 UTC (permalink / raw) To: Dave Chinner; +Cc: xfs On Tue, Jan 12, 2010 at 03:41:07PM +1100, Dave Chinner wrote: > Loop devices are now created and destroyed on demand, and > the existing hacks to do this no longer work. Remove them. Just noticed that I had not been running this test at all for a long time as it doesn't work with external logs. Seems like the current code indeed fails reliably for me and this patch fixes it. The only problem is that the loop device autodestruct features is only available since Linux 2.6.25 and also needs a recent util-linux. Is this old enough to simply go with the auto destruct version, or do we need to support either one? What about the patch below? This adds the -d argument to the umount calls for the loop images, which destroys the loop images in older kernels and is a no-op for modern kernels that have the loop auto-destruct feature: Loop devices are now created and destroyed on demand, and the existing hacks to do this no longer work. Remove them. Signed-off-by: Dave Chinner <david@fromorbit.com> --- 073 | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) Index: xfstests-dev/073 =================================================================== --- xfstests-dev.orig/073 2009-05-28 18:29:58.000000000 +0000 +++ xfstests-dev/073 2010-01-12 09:53:37.000000000 +0000 @@ -3,15 +3,6 @@ # # Test xfs_copy # -# HACK WARNING: -# -# Due to the severe brokenness of mount's handling of loopback devices, we -# hardcode the loop devices we use for this test. This enables us to clean up -# the pieces when we remount the loop device because mount loses all trace of -# the fact this is a loop device. Hence to enable us to unmount the hosting -# filesystem, we need to manually tear down the relevant loop device. If -# mount ever gets fixed then this hack can be removed. -# #----------------------------------------------------------------------- # Copyright (c) 2000-2003,2008 Silicon Graphics, Inc. All Rights Reserved. # @@ -51,7 +42,7 @@ _cleanup() { cd / umount $SCRATCH_MNT 2>/dev/null - umount $imgs.loop 2>/dev/null + umount -d $imgs.loop 2>/dev/null [ -d $imgs.loop ] && rmdir $imgs.loop [ -d $imgs.source_dir ] && rm -rf $imgs.source_dir rm -f $imgs.* $tmp.* /var/tmp/xfs_copy.log.* @@ -127,9 +118,7 @@ _verify_copy() diff -u $tmp.geometry1 $tmp.geometry2 echo unmounting and removing new image - loop=`mount | grep $target | grep -o -e 'loop=.*[^),]' | grep -o -e '/.*$'` - umount $source $target - losetup -d $loop > /dev/null 2>&1 + umount -d $source_dir $target_dir rm -f $target } _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/4] xfsqa: make unmounting loop devices in 073 work again 2010-01-12 10:00 ` Christoph Hellwig @ 2010-01-12 11:51 ` Dave Chinner 0 siblings, 0 replies; 10+ messages in thread From: Dave Chinner @ 2010-01-12 11:51 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs On Tue, Jan 12, 2010 at 05:00:31AM -0500, Christoph Hellwig wrote: > On Tue, Jan 12, 2010 at 03:41:07PM +1100, Dave Chinner wrote: > > Loop devices are now created and destroyed on demand, and > > the existing hacks to do this no longer work. Remove them. > > Just noticed that I had not been running this test at all for a long > time as it doesn't work with external logs. > > Seems like the current code indeed fails reliably for me and this > patch fixes it. > > The only problem is that the loop device autodestruct features is only > available since Linux 2.6.25 and also needs a recent util-linux. Is > this old enough to simply go with the auto destruct version, or do > we need to support either one? > > What about the patch below? This adds the -d argument to the umount > calls for the loop images, which destroys the loop images in older > kernels and is a no-op for modern kernels that have the loop > auto-destruct feature: Yes, that looks like a better way to solve the problem. Cheers, Dave. -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/4] xfsqa: filter log size in 206 2010-01-12 4:41 [PATCH 0/4] xfsqa: make some tests work again, add xfs_fsr test Dave Chinner 2010-01-12 4:41 ` [PATCH 1/4] xfsqa: filter the fsstress seed output in 104 Dave Chinner 2010-01-12 4:41 ` [PATCH 2/4] xfsqa: make unmounting loop devices in 073 work again Dave Chinner @ 2010-01-12 4:41 ` Dave Chinner 2010-01-12 9:47 ` Christoph Hellwig 2010-01-12 4:41 ` [PATCH 4/4] xfsqa: add simple xfs_fsr test Dave Chinner 3 siblings, 1 reply; 10+ messages in thread From: Dave Chinner @ 2010-01-12 4:41 UTC (permalink / raw) To: xfs With the log size now going past 128MB, test 206 creates a filesystem with a much larger log than 128MB. The golden output expects at 128MB log size, so the test breaks. Filter the log size out of the mkfs output and golden output so that the test works on both older and newer mkfs binaries. Signed-off-by: Dave Chinner <david@fromorbit.com> --- 206 | 9 ++++++--- 206.out | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/206 b/206 index b1b2286..0935335 100755 --- a/206 +++ b/206 @@ -75,19 +75,22 @@ dd if=/dev/zero of=$tmpfile bs=1 seek=19998630180864 count=1 >/dev/null 2>&1 \ # mkfs slightly smaller than that echo "=== mkfs.xfs ===" mkfs.xfs -f -bsize=4096 -dagsize=76288719b,size=3905982455b -llazy-count=0 $tmpfile \ - | sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" + | sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" \ + -e "s/\(^log.*blocks=\)\([0-9]*,\)/\1XXXXX,/" mount -o loop $tmpfile $tmpdir || _fail "!!! failed to loopback mount" # see what happens when we growfs it echo "=== xfs_growfs ===" xfs_growfs $tmpdir \ - | sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" + | sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" \ + -e "s/\(^log.*blocks=\)\([0-9]*,\)/\1XXXXX,/" # and double-check the new geometry echo "=== xfs_info ===" xfs_info $tmpdir \ - | sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" + | sed -e "s,^meta-data=.*isize,meta-data=FILE isize,g" \ + -e "s/\(^log.*blocks=\)\([0-9]*,\)/\1XXXXX,/" # _cleanup cleans up for us diff --git a/206.out b/206.out index 57d4f4e..da70d01 100644 --- a/206.out +++ b/206.out @@ -6,7 +6,7 @@ meta-data=FILE isize=256 agcount=52, agsize=76288719 blks data = bsize=4096 blocks=3905982455, imaxpct=5 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 -log =internal log bsize=4096 blocks=32768, version=2 +log =internal log bsize=4096 blocks=XXXXX, version=2 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 === xfs_growfs === @@ -15,7 +15,7 @@ meta-data=FILE isize=256 agcount=52, agsize=76288719 blks data = bsize=4096 blocks=3905982455, imaxpct=5 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 -log =internal bsize=4096 blocks=32768, version=2 +log =internal bsize=4096 blocks=XXXXX, version=2 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 3905982455 to 4882478016 @@ -25,6 +25,6 @@ meta-data=FILE isize=256 agcount=64, agsize=76288719 blks data = bsize=4096 blocks=4882478016, imaxpct=5 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 -log =internal bsize=4096 blocks=32768, version=2 +log =internal bsize=4096 blocks=XXXXX, version=2 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 -- 1.6.5 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 3/4] xfsqa: filter log size in 206 2010-01-12 4:41 ` [PATCH 3/4] xfsqa: filter log size in 206 Dave Chinner @ 2010-01-12 9:47 ` Christoph Hellwig 0 siblings, 0 replies; 10+ messages in thread From: Christoph Hellwig @ 2010-01-12 9:47 UTC (permalink / raw) To: Dave Chinner; +Cc: xfs On Tue, Jan 12, 2010 at 03:41:08PM +1100, Dave Chinner wrote: > With the log size now going past 128MB, test 206 creates a filesystem > with a much larger log than 128MB. The golden output expects at > 128MB log size, so the test breaks. Filter the log size out of the > mkfs output and golden output so that the test works on both older and > newer mkfs binaries. I guess you'll need a large enough test filesystem to hit this so I don't see it, but it looks good, Reviewed-by: Christoph Hellwig <hch@lst.de> _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/4] xfsqa: add simple xfs_fsr test 2010-01-12 4:41 [PATCH 0/4] xfsqa: make some tests work again, add xfs_fsr test Dave Chinner ` (2 preceding siblings ...) 2010-01-12 4:41 ` [PATCH 3/4] xfsqa: filter log size in 206 Dave Chinner @ 2010-01-12 4:41 ` Dave Chinner 2010-01-12 9:50 ` Christoph Hellwig 3 siblings, 1 reply; 10+ messages in thread From: Dave Chinner @ 2010-01-12 4:41 UTC (permalink / raw) To: xfs We have very little fsr test coverage in the test suite right now. 042 is the only test that runs it, and it only defragments a single file. Improve the coverage by simply running xfs_fsr of the test filesystem. This gives xfs_fsr a wide variety of inodes to try to defragment. A simple test like this would have tripped over the attr2 fork offset problems in the swap extents ioctl long ago thanks to the varied nature of inodes the test suite leaves around in this filesystem. Signed-off-by: Dave Chinner <david@fromorbit.com> --- 221 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 221.out | 2 ++ group | 1 + 3 files changed, 60 insertions(+), 0 deletions(-) create mode 100644 221 create mode 100644 221.out diff --git a/221 b/221 new file mode 100644 index 0000000..5fe5583 --- /dev/null +++ b/221 @@ -0,0 +1,57 @@ +#! /bin/sh +# FS QA Test No. 221 +# +# xfs_fsr QA tests +# run xfs_fsr over the test filesystem to give it a wide and varied set of +# inodes to try to defragment. This is effectively a crash/assert failure +# test looking for corruption induced by xfs_fsr runs. +# +#----------------------------------------------------------------------- +# Copyright (c) 2010 Dave Chinner. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +#----------------------------------------------------------------------- +# +# creator +owner=david@fromorbit.com + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! + +_cleanup() +{ + rm -f $tmp.* +} + +trap "_cleanup ; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +# real QA test starts here +_supported_fs xfs +_supported_os Linux + +[ "$XFS_FSR_PROG" = "" ] && _notrun "xfs_fsr not found" + +xfs_fsr $TEST_MNT > /dev/null 2>&1 + +echo "--- silence is golden ---" +status=0 ; exit diff --git a/221.out b/221.out new file mode 100644 index 0000000..34b5d1b --- /dev/null +++ b/221.out @@ -0,0 +1,2 @@ +QA output created by 221 +--- silence is golden --- diff --git a/group b/group index 2c2e293..528f5e9 100644 --- a/group +++ b/group @@ -330,3 +330,4 @@ prealloc 218 auto fsr quick 219 auto quota quick 220 auto quota quick +221 fsr ioctl auto quick -- 1.6.5 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 4/4] xfsqa: add simple xfs_fsr test 2010-01-12 4:41 ` [PATCH 4/4] xfsqa: add simple xfs_fsr test Dave Chinner @ 2010-01-12 9:50 ` Christoph Hellwig 0 siblings, 0 replies; 10+ messages in thread From: Christoph Hellwig @ 2010-01-12 9:50 UTC (permalink / raw) To: Dave Chinner; +Cc: xfs On Tue, Jan 12, 2010 at 03:41:09PM +1100, Dave Chinner wrote: > We have very little fsr test coverage in the test suite right now. > 042 is the only test that runs it, and it only defragments a single > file. > > Improve the coverage by simply running xfs_fsr of the test > filesystem. This gives xfs_fsr a wide variety of inodes to try to > defragment. A simple test like this would have tripped over the > attr2 fork offset problems in the swap extents ioctl long ago > thanks to the varied nature of inodes the test suite leaves around > in this filesystem. Looks good, and having it after 200+ testcases also means it should have at least a bit of work to do. Reviewed-by: Christoph Hellwig <hch@lst.de> _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-01-12 11:50 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-01-12 4:41 [PATCH 0/4] xfsqa: make some tests work again, add xfs_fsr test Dave Chinner 2010-01-12 4:41 ` [PATCH 1/4] xfsqa: filter the fsstress seed output in 104 Dave Chinner 2010-01-12 9:31 ` Christoph Hellwig 2010-01-12 4:41 ` [PATCH 2/4] xfsqa: make unmounting loop devices in 073 work again Dave Chinner 2010-01-12 10:00 ` Christoph Hellwig 2010-01-12 11:51 ` Dave Chinner 2010-01-12 4:41 ` [PATCH 3/4] xfsqa: filter log size in 206 Dave Chinner 2010-01-12 9:47 ` Christoph Hellwig 2010-01-12 4:41 ` [PATCH 4/4] xfsqa: add simple xfs_fsr test Dave Chinner 2010-01-12 9:50 ` Christoph Hellwig
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox