Skip to contentSkip to conversation

xfstests: fix 122 for recent xfsprogs

PATCH In review Christoph Hellwig 3 participants 14 messages Oct 10, 2011 – Oct 13, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 xfstests: fix 122 for recent xfsprogs

- filter out xfs_alloctype_t, this was an internal emum that got removed
- filter out xfs_bmbt_rec_32_t, this is a variant of the xfs_bmbt_rec_t that had almost no users and was removed
- filter out xfs_dinode_core_t, the separate dinode core is gone, and just checking the size of the full dinode is enough
- accept xfs_bmbt_rec_t as the new canonical name for xfs_bmbt_rec_64_t, and replace the old name with the new one in the output stream.

122 +10 -1
Index: xfstests-dev/122
===================================================================
@@ -57,6 +57,12 @@ s/sizeof\( xfs_agf_t \) = 64/sizeof( xfs
 	fi
 }
 
+# filter out known changes to xfs type names
+_type_name_filter()
+{
+	sed -e 's/xfs_bmbt_rec_64_t/xfs_bmbt_rec_t/'
+}
+
 _attribute_filter()
 {
 	sed -e 's/__attribute__ *[(][(]packed[)][)]//' \
@@ -73,7 +79,9 @@ cat >$cprog <<EOF
 EOF
 
 cat >$tmp.ignore <<EOF
+xfs_alloctype_t
 xfs_buf_cancel_t
+xfs_bmbt_rec_32_t
 xfs_swapext_t
 xfs_dirops_t
 xfs_efi_log_item_t
@@ -160,6 +168,7 @@ xfs_log_item_chunk_t
 xfs_trans_t
 xfs_dirent_t
 xfs_fsop_getparents_handlereq_t
+xfs_dinode_core_t
 EOF
 
 echo 'int main(int argc, char *argv[]) {' >>$cprog
@@ -193,7 +202,7 @@ echo 'return 0; }' >>$cprog
 # create and run program
 cc -o $oprog $cprog >> $seq.full 2>&1 || \
   _notrun "Could not compile test program (see end of $seq.full)"
-$oprog | _type_size_filter > $progout
+$oprog | _type_size_filter | _type_name_filter > $progout
 
 #
 # add addition sizes and xfs_sb_t fields that don't exist in the version
122.out +1 -4
Index: xfstests-dev/122.out
===================================================================
@@ -50,7 +50,6 @@ sizeof( xfs_agfl_t ) = 4
 sizeof( xfs_agi_t ) = 296
 sizeof( xfs_alloc_rec_incore_t ) = 8
 sizeof( xfs_alloc_rec_t ) = 8
-sizeof( xfs_alloctype_t ) = 4
 sizeof( xfs_attr_inactive_list_t ) = 8
 sizeof( xfs_attr_leaf_entry_t ) = 8
 sizeof( xfs_attr_leaf_hdr_t ) = 32
@@ -61,14 +60,12 @@ sizeof( xfs_attr_leafblock_t ) = 56
 sizeof( xfs_attr_shortform_t ) = 8
 sizeof( xfs_attrlist_cursor_t ) = 16
 sizeof( xfs_bmbt_key_t ) = 8
-sizeof( xfs_bmbt_rec_32_t ) = 16
-sizeof( xfs_bmbt_rec_64_t ) = 16
+sizeof( xfs_bmbt_rec_t ) = 16
 sizeof( xfs_bmdr_block_t ) = 4
 sizeof( xfs_btnum_t ) = 4
 sizeof( xfs_buf_log_format_t ) = 24
 sizeof( xfs_da_blkinfo_t ) = 12
 sizeof( xfs_da_intnode_t ) = 24
-sizeof( xfs_dinode_core_t ) = 96
 sizeof( xfs_dinode_fmt_t ) = 4
 sizeof( xfs_dir2_data_free_t ) = 4
 sizeof( xfs_dir2_data_hdr_t ) = 16

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw

PATCH 2/2 xfstests: split mapped writes vs direct I/O tests from 091

This effectively reverts

xfstests: add mapped write fsx operations to 091

and adds a new test case for it. It tests something slightly different, and regressions in existing tests due to new features are pretty nasty in a test suite.

263 new file +64 -0
Index: xfstests-dev/263
===================================================================
@@ -0,0 +1,64 @@
+#! /bin/bash
+# FS QA Test No. 263
+#
+# fsx exercising direct IO vs sub-block buffered I/O
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2000-2004 Silicon Graphics, Inc.  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
[email protected]
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1	# failure is the default!
+trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+# real QA test starts here
+_supported_fs generic
+_supported_os Linux
+
+rm -f $seq.full
+
+run_fsx()
+{
+	echo fsx $@ | tee -a $seq.full
+	args=`echo $@ | sed -e "s/ BSIZE / $bsize /g" -e "s/ PSIZE / $psize /g"`
+	rm -f $TEST_DIR/junk
+	$here/ltp/fsx $args $TEST_DIR/junk >>$seq.full 2>&1
+	if [ $? -ne 0 ]; then
+		cat $seq.full
+		exit 1
+	fi
+}
+
+psize=`$here/src/feature -s`
+bsize=`blockdev --getss $TEST_DEV`
+
+run_fsx -N 10000  -o 8192   -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
+run_fsx -N 10000  -o 128000 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
+
+status=0
+exit
group +1 -0
Index: xfstests-dev/group
===================================================================
@@ -376,3 +376,4 @@ deprecated
 260 auto quick trim
 261 auto quick quota
 262 auto quick quota
+263 rw auto quick
263.out new file +3 -0
Index: xfstests-dev/263.out
===================================================================
@@ -0,0 +1,3 @@
+QA output created by 263
+fsx -N 10000 -o 8192 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
+fsx -N 10000 -o 128000 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
091 +0 -6
Index: xfstests-dev/091
===================================================================
@@ -88,11 +88,5 @@ kernel=`uname -r  | sed -e 's/\(2\..\).*
 #run_fsx -N 10000  -o 128000 -l 500000 -r PSIZE -t PSIZE -w PSIZE -Z -W
  run_fsx -N 10000  -o 128000 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -W
 
- run_fsx -N 10000  -o 8192   -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
- run_fsx -N 10000  -o 128000 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
-
-# Commented out calls above are less likely to pick up issues, so
-# save time by commenting them out (leave 'em for manual testing).
-
 status=0
 exit
091.out +0 -2
Index: xfstests-dev/091.out
===================================================================
@@ -5,5 +5,3 @@ fsx -N 10000 -o 32768 -l 500000 -r PSIZE
 fsx -N 10000 -o 8192 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -R -W
 fsx -N 10000 -o 32768 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -R -W
 fsx -N 10000 -o 128000 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z -W
-fsx -N 10000 -o 8192 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z
-fsx -N 10000 -o 128000 -l 500000 -r PSIZE -t BSIZE -w BSIZE -Z

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw

PATCH 3/3 xfstests: allow 091 for non-xfs filesystems

The tests in 091 are entirely generic and pass e.g. on ext4 and jfs. btrfs fails it, but that looks a like a btrfs-specific issue to me.

091 +1 -1
Index: xfstests-dev/091
===================================================================
@@ -37,7 +37,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2
 . ./common.filter
 
 # real QA test starts here
-_supported_fs xfs
+_supported_fs generic
 _supported_os Linux IRIX
 
 [ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet"

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw

Re: [PATCH 3/3] xfstests: allow 091 for non-xfs filesystems

Quoted 10 lines · Christoph Hellwig

The tests in 091 are entirely generic and pass e.g. on ext4 and jfs. btrfs fails it, but that looks a like a btrfs-specific issue to me.

Index: xfstests-dev/091
===================================================================

091 trap "rm -f $tmp.*; exit \$status" 0 1 2 · line 43

Quoted 8 lines
091 +1 -1
@@ -37,7 +37,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2
 . ./common.filter
 
 # real QA test starts here
-_supported_fs xfs
+_supported_fs generic
 _supported_os Linux IRIX
 
 [ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet"

Given that the test is not run on irix, I'd change the _supported_os line to just Linux as well, and kill the separate check for Irix while you are there.

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#5 lore raw

PATCH v2 3/3 xfstests: allow 091 for non-xfs filesystems

In reply to Christoph Hellwig

The tests in 091 are entirely generic and pass e.g. on ext4 and jfs. btrfs fails it, but that looks a like a btrfs-specific issue to me.

Also use _supported_os properly instead of erroring out manually on IRIX.

091 +2 -4
Index: xfstests-dev/091
===================================================================
@@ -37,10 +37,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2
 . ./common.filter
 
 # real QA test starts here
-_supported_fs xfs
-_supported_os Linux IRIX
-
-[ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet"
+_supported_fs generic
+_supported_os Linux
 
 rm -f $seq.full
 

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/3
#12 lore raw
In reply to Christoph Hellwig
Quoted 9 lines · Christoph Hellwig

- filter out xfs_alloctype_t, this was an internal emum that got removed
- filter out xfs_bmbt_rec_32_t, this is a variant of the xfs_bmbt_rec_t that had almost no users and was removed
- filter out xfs_dinode_core_t, the separate dinode core is gone, and just checking the size of the full dinode is enough
- accept xfs_bmbt_rec_t as the new canonical name for xfs_bmbt_rec_64_t, and replace the old name with the new one in the output stream.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 2/2
#8 lore raw

Re: [PATCH 2/2] xfstests: split mapped writes vs direct I/O tests from 091

In reply to Christoph Hellwig
Quoted 7 lines · Christoph Hellwig

This effectively reverts

xfstests: add mapped write fsx operations to 091

and adds a new test case for it. It tests something slightly different, and regressions in existing tests due to new features are pretty nasty in a test suite.

Makes sense.

Quoted 22 lines

Index: xfstests-dev/263
===================================================================

263 new file +15 -0
@@ -0,0 +1,64 @@
+#! /bin/bash
+# FS QA Test No. 263
+#
+# fsx exercising direct IO vs sub-block buffered I/O
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2000-2004 Silicon Graphics, Inc.  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

263 line 25

Quoted 10 lines
263 new file +10 -0
+# 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
[email protected]

No point keeping an invalid email address as the owner of a new test.

FWIW, I'm considering removing this from the tests as the information is in the commit history, and the use of the field (emailing the owner when the automated test infrastructure SGI used 10 years ago failed) is no longer used...

Otherwise looks OK.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v2 3/3
#6 lore raw

Re: [PATCH 3/3 v2] xfstests: allow 091 for non-xfs filesystems

In reply to Christoph Hellwig
Quoted 7 lines · Christoph Hellwig

The tests in 091 are entirely generic and pass e.g. on ext4 and jfs. btrfs fails it, but that looks a like a btrfs-specific issue to me.

Also use _supported_os properly instead of erroring out manually on IRIX.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#9 lore raw

Re: [PATCH 2/2] xfstests: split mapped writes vs direct I/O tests from 091

In reply to Dave Chinner
Quoted 10 lines · Dave Chinner

263 line 25

Quoted 2 lines
263 new file +2 -0
+# creator
[email protected]

No point keeping an invalid email address as the owner of a new test.

FWIW, I'm considering removing this from the tests as the information is in the commit history, and the use of the field (emailing the owner when the automated test infrastructure SGI used 10 years ago failed) is no longer used...

We should really just kill it. If anyone runs the test automated again he should get the mails and/or cc the xfs lists.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/3
#13 lore raw
In reply to Christoph Hellwig
Quoted 9 lines · Christoph Hellwig

- filter out xfs_alloctype_t, this was an internal emum that got removed
- filter out xfs_bmbt_rec_32_t, this is a variant of the xfs_bmbt_rec_t that had almost no users and was removed
- filter out xfs_dinode_core_t, the separate dinode core is gone, and just checking the size of the full dinode is enough
- accept xfs_bmbt_rec_t as the new canonical name for xfs_bmbt_rec_64_t, and replace the old name with the new one in the output stream.

Looks good.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 2/2
#11 lore raw

Re: [PATCH 2/2] xfstests: split mapped writes vs direct I/O tests from 091

In reply to Christoph Hellwig
Quoted 9 lines · Christoph Hellwig

This effectively reverts

xfstests: add mapped write fsx operations to 091

and adds a new test case for it. It tests something slightly different, and regressions in existing tests due to new features are pretty nasty in a test suite.

Looks good. I see no need to re-post just to delete the "author" line. Do that as a separate commit that updates all the tests at once.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v2 3/3
#7 lore raw

Re: [PATCH 3/3 v2] xfstests: allow 091 for non-xfs filesystems

In reply to Christoph Hellwig
Quoted 7 lines · Christoph Hellwig

The tests in 091 are entirely generic and pass e.g. on ext4 and jfs. btrfs fails it, but that looks a like a btrfs-specific issue to me.

Also use _supported_os properly instead of erroring out manually on IRIX.

Looks OK to me.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#10 lore raw

Re: [PATCH 2/2] xfstests: split mapped writes vs direct I/O tests from 091

In reply to Dave Chinner
Quoted 38 lines · Dave Chinner
Quoted 7 lines · Christoph Hellwig

This effectively reverts

xfstests: add mapped write fsx operations to 091

and adds a new test case for it. It tests something slightly different, and regressions in existing tests due to new features are pretty nasty in a test suite.

Makes sense.

Quoted 27 lines

Index: xfstests-dev/263
===================================================================

263 new file +20 -0
@@ -0,0 +1,64 @@
+#! /bin/bash
+# FS QA Test No. 263
+#
+# fsx exercising direct IO vs sub-block buffered I/O
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2000-2004 Silicon Graphics, Inc.  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
Quoted 8 lines

263 line 25

Quoted 5 lines
263 new file +5 -0
+#
+#-----------------------------------------------------------------------
+#
+# creator
[email protected]

No point keeping an invalid email address as the owner of a new test.

My only comment was that there is some small value in knowing who the original author of the test.

Quoted 4 lines

FWIW, I'm considering removing this from the tests as the information is in the commit history, and the use of the field (emailing the owner when the automated test infrastructure SGI used 10 years ago failed) is no longer used...

...but you're right, it would be in the commit history so that's probably sufficient. I have no objection to deleting it from all the tests (and the template).

-Alex

Quoted 3 lines

Otherwise looks OK.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs