From: Dave Chinner Date: Fri, 15 Mar 2013 12:27:57 +0000 (+0000) Subject: xfstests: move xfs specific tests out of top directory X-Git-Tag: v2022.05.01~3482 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fc48dfb96676c140ab371ab7723d59e3a4445d84;p=xfstests-dev.git xfstests: move xfs specific tests out of top directory And into tests/xfs. Tests found and moved via: $ grep "supported_fs xfs$" [0-2]* | cut -d : -f 1 > xfs.tests $ for i in `cat xfs.tests`; do > git mv $i* tests/xfs/ > grep ^$i group >> tests/xfs/group > sed -i -e "/^$i/d" group > done Output now looks like: sudo ./check -g quick -r FSTYP -- xfs (debug) PLATFORM -- Linux/x86_64 test-1 3.5.0-rc5-dgc+ MKFS_OPTIONS -- -f -bsize=4096 /dev/vdb MOUNT_OPTIONS -- /dev/vdb /mnt/scratch xfs/170 4s generic/120 16s generic/248 0s generic/213 0s generic/256 39s xfs/121 6s xfs/026 11s generic/131 1s xfs/187 1s generic/135 0s .... Signed-off-by: Dave Chinner Reviewed-by: Phil White [rjohnston@sgi.com did not move test 032, belongs in shared] Signed-off-by: Rich Johnston --- diff --git a/003 b/003 deleted file mode 100755 index 79b6bc51..00000000 --- a/003 +++ /dev/null @@ -1,91 +0,0 @@ -#! /bin/bash -# FS QA Test No. 003 -# -# exercise xfs_db bug #784078 -# -#----------------------------------------------------------------------- -# Copyright (c) 2000-2001 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 -# -#----------------------------------------------------------------------- -# - -seq=`basename $0` -echo "QA output created by $seq" - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -tmp=/tmp/$$ -here=`pwd` -status=0 # success is the default! -trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 - -_need_to_be_root - -# real QA test starts here -_supported_fs xfs -_supported_os IRIX Linux - -[ -f core ] && rm -f core -[ -f core ] && echo "Warning: can't nuke existing core file!" - -test_done() -{ - sts=$? - [ -f core ] && echo "FAILED - core file" - [ ! -f core -a $sts != 0 ] && echo "FAILED - non-zero exit status" - rm -f core -} - -# real QA test starts here - -echo "=== TEST 1 ===" -xfs_db -r -c 'pop' -c 'type sb' $TEST_DEV -test_done - -echo "=== TEST 2 ===" -xfs_db -r -c 'push sb' $TEST_DEV -test_done - -echo "=== TEST 3 ===" -xfs_db -r -c 'pop' -c 'push sb' $TEST_DEV -test_done - -echo "=== TEST 4 ===" -xfs_db -r -c 'type sb' -c 'print' $TEST_DEV -test_done - -echo "=== TEST 5 ===" -xfs_db -r -c 'inode 128' -c 'push' -c 'type' $TEST_DEV >$tmp.out 2>&1 -test_done -# On IRIX we lose state after a "push" operation and don't -# know the type is still inode -# Probably not worth changing xfs_db on IRIX for this. -if [ "$HOSTOS" != "IRIX" ]; then - if ! grep -q "current type is \"inode\"" $tmp.out - then - cat $tmp.out - fi -fi - -echo "=== TEST 6 ===" -xfs_db -r -c 'sb' -c 'a' $TEST_DEV >$tmp.out 2>&1 # don't care about output -test_done - -echo "=== TEST 7 ===" -xfs_db -r -c 'ring' $TEST_DEV -test_done diff --git a/003.out b/003.out deleted file mode 100644 index e55df2ea..00000000 --- a/003.out +++ /dev/null @@ -1,12 +0,0 @@ -QA output created by 003 -=== TEST 1 === -no current object -=== TEST 2 === -=== TEST 3 === -=== TEST 4 === -no current object -no current type -=== TEST 5 === -=== TEST 6 === -=== TEST 7 === -no entries in location ring. diff --git a/004 b/004 deleted file mode 100755 index d75c3c0e..00000000 --- a/004 +++ /dev/null @@ -1,142 +0,0 @@ -#! /bin/bash -# FS QA Test No. 004 -# -# exercise xfs_db bug #789674 and other freesp functionality -# -#----------------------------------------------------------------------- -# Copyright (c) 2000-2002 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 -# -#----------------------------------------------------------------------- -# - -seq=`basename $0` -echo "QA output created by $seq" - -here=`pwd` -tmp=/tmp/$$ -status=0 - -_cleanup() -{ - umount $SCRATCH_MNT - rm -f $tmp.* - exit $status -} -trap "_cleanup" 0 1 2 3 15 - -_populate_scratch() -{ - echo "=== mkfs output ===" >>$seq.full - _scratch_mkfs_xfs | tee -a $seq.full | _filter_mkfs 2>$tmp.mkfs - . $tmp.mkfs - _scratch_mount - dd if=/dev/zero of=$SCRATCH_MNT/foo count=200 bs=4096 >/dev/null 2>&1 & - dd if=/dev/zero of=$SCRATCH_MNT/goo count=400 bs=4096 >/dev/null 2>&1 & - dd if=/dev/zero of=$SCRATCH_MNT/moo count=800 bs=4096 >/dev/null 2>&1 & - wait - umount $SCRATCH_MNT # flush everything - _scratch_mount # and then remount -} - - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -# real QA test starts here -_supported_fs xfs -_supported_os IRIX Linux - -_need_to_be_root -_require_scratch -_require_no_large_scratch_dev - -rm -f $seq.full - -_populate_scratch - -[ "$HOSTOS" = "Linux" ] && DF_PROG="$DF_PROG -P --block-size=512" - -eval `$DF_PROG $SCRATCH_MNT 2>&1 \ - | tail -1 | $AWK_PROG '{ printf "blocks=%u used=%u avail=%u\n", $3, $4, $5 }'` -echo "df gave: blocks=$blocks used=$used avail=$avail" >>$seq.full -echo "blocksize from mkfs is '$dbsize'" >>$seq.full - -xfs_db -r -c "freesp -s" $SCRATCH_DEV >$tmp.xfs_db -echo "xfs_db for $SCRATCH_DEV" >>$seq.full -cat $tmp.xfs_db >>$seq.full - -eval `$XFS_IO_PROG -x -c resblks $SCRATCH_MNT 2>&1 \ - | $AWK_PROG '/available/ { printf "resblks=%u\n", $5 }'` -echo "resblks gave: resblks=$resblks" >>$seq.full - -# check the 'blocks' field from freesp command is OK -# since 2.6.18, df does not report the 4 blocks per AG that cannot -# be allocated, hence we check for that exact mismatch. -# since ~2.6.22, reserved blocks are used by default and df does -# not report them, hence check for an exact mismatch. -perl -ne ' - BEGIN { $avail ='$avail' * 512; - $answer="(no xfs_db free blocks line?)" } - /free blocks (\d+)$/ || next; - $freesp = $1 * '$dbsize'; - if ($freesp == $avail) { - $answer = "yes"; - } else { - $avail = $avail + (('$agcount' + 1) * '$dbsize' * 4); - if ($freesp == $avail) { - $answer = "yes"; - } else { - $avail = $avail + ('$resblks' * '$dbsize'); - if ($freesp == $avail) { - $answer = "yes"; - } else { - $answer = "no ($freesp != $avail)"; - } - } - } - END { print "$answer\n" } - ' <$tmp.xfs_db >$tmp.ans -ans="`cat $tmp.ans`" -echo "Checking blocks column same as df: $ans" -if [ "$ans" != yes ] -then - echo "Error: $SCRATCH_DEV: freesp mismatch: $ans" - echo "xfs_db output ..." - cat $tmp.xfs_db - status=1 -fi - -# check the 'pct' field from freesp command is good -perl -ne ' - BEGIN { $percent = 0; } - /free/ && next; # skip over free extent size number - if (/\s+(\d+\.\d+)$/) { - $percent += $1; - } - END { $percent += 0.5; print int($percent), "\n" } # round up -' <$tmp.xfs_db >$tmp.ans -ans="`cat $tmp.ans`" -echo "Checking percent column yields 100: $ans" -if [ "$ans" != 100 ] -then - echo "Error: $SCRATCH_DEV: pct mismatch: $ans (expected 100)" - echo "xfs_db output ..." - cat $tmp.xfs_db - status=1 -fi - -exit diff --git a/004.out b/004.out deleted file mode 100644 index b94d653d..00000000 --- a/004.out +++ /dev/null @@ -1,9 +0,0 @@ -QA output created by 004 -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX -Checking blocks column same as df: yes -Checking percent column yields 100: 100 diff --git a/008 b/008 deleted file mode 100755 index 0dee9f50..00000000 --- a/008 +++ /dev/null @@ -1,116 +0,0 @@ -#! /bin/bash -# FS QA Test No. 008 -# -# randholes test -# -#----------------------------------------------------------------------- -# Copyright (c) 2000-2002 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 -# -#----------------------------------------------------------------------- -# - -seq=`basename $0` -echo "QA output created by $seq" - -here=`pwd` -tmp=/tmp/$$ -status=0 # success is the default! -pgsize=`$here/src/feature -s` -trap "_cleanup; exit \$status" 0 1 2 3 15 - -_cleanup() -{ - rm -f $tmp.* - rm -rf $testdir/randholes.$$.* - _cleanup_testdir -} - -_filter() -{ - sed -e "s/-b $pgsize/-b PGSIZE/g" \ - -e "s/-l .* -c/-l FSIZE -c/g" -} - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -_do_test() -{ - _n="$1" - _holes="$2" - _param="$3" - - out=$testdir/randholes.$$.$_n - echo "" - echo "randholes.$_n : $_param" | _filter - echo "------------------------------------------" - if $here/src/randholes $_param $out >$tmp.out - then - # only check if we're not allocating in huge chunks (extsz flag) - if _test_inode_flag extsize $out || _test_inode_flag realtime $out - then - echo "holes is in range" - else - # quick check - how many holes did we get? - count=`xfs_bmap $out | egrep -c ': hole'` - # blocks can end up adjacent, therefore number of holes varies - _within_tolerance "holes" $count $_holes 10% -v - fi - else - echo " randholes returned $? - see $seq.out.full" - echo "--------------------------------------" >>$here/$seq.out.full - echo "$_n - output from randholes:" >>$here/$seq.out.full - echo "--------------------------------------" >>$here/$seq.out.full - cat $tmp.out >>$here/$seq.out.full - echo "--------------------------------------" >>$here/$seq.out.full - echo "$_n - output from bmap:" >>$here/$seq.out.full - echo "--------------------------------------" >>$here/$seq.out.full - xfs_bmap -vvv $out >>$here/$seq.out.full - status=1 - fi -} - -# real QA test starts here -_supported_fs xfs -_supported_os IRIX Linux - -_setup_testdir - -rm -f $here/$seq.out.full - -# Note on special numbers here. -# -# We are trying to create roughly 50 or 100 holes in a file -# using random writes. Assuming a good distribution of 50 writes -# in a file, the file only needs to be 3-4x the size of the write -# size muliplied by the number of writes. Hence we use 200 * pgsize -# for files we want 50 holes in and 400 * pgsize for files we want -# 100 holes in. This keeps the runtime down as low as possible. -# -_do_test 1 50 "-l `expr 200 \* $pgsize` -c 50 -b $pgsize" -_do_test 2 100 "-l `expr 400 \* $pgsize` -c 100 -b $pgsize" -_do_test 3 100 "-l `expr 400 \* $pgsize` -c 100 -b 512" # test partial pages - -# rinse, lather, repeat for direct IO -_do_test 4 50 "-d -l `expr 200 \* $pgsize` -c 50 -b $pgsize" -_do_test 5 100 "-d -l `expr 400 \* $pgsize` -c 100 -b $pgsize" -# note: direct IO requires page aligned IO - -# todo: realtime. - -# success, all done -exit diff --git a/008.out b/008.out deleted file mode 100644 index 5e3ae8e3..00000000 --- a/008.out +++ /dev/null @@ -1,21 +0,0 @@ -QA output created by 008 - -randholes.1 : -l FSIZE -c 50 -b PGSIZE ------------------------------------------- -holes is in range - -randholes.2 : -l FSIZE -c 100 -b PGSIZE ------------------------------------------- -holes is in range - -randholes.3 : -l FSIZE -c 100 -b 512 ------------------------------------------- -holes is in range - -randholes.4 : -d -l FSIZE -c 50 -b PGSIZE ------------------------------------------- -holes is in range - -randholes.5 : -d -l FSIZE -c 100 -b PGSIZE ------------------------------------------- -holes is in range diff --git a/009 b/009 deleted file mode 100755 index 1883f15f..00000000 --- a/009 +++ /dev/null @@ -1,187 +0,0 @@ -#! /bin/bash -# FS QA Test No. 009 -# -# XFS allocator test (preallocation - allocp, resvsp ,etc) -# -#----------------------------------------------------------------------- -# Copyright (c) 2000-2002 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 -# -#----------------------------------------------------------------------- -# - -seq=`basename $0` -echo "QA output created by $seq" - -here=`pwd` -tmp=/tmp/$$ -status=1 # failure is the default! -trap "_cleanup; exit \$status" 0 1 2 3 15 -# This isn't really related to fs block size, it's just what -# alloc uses for the "block" unit in it's input parameters... -bsize=4096 - -_cleanup() -{ - echo "*** unmount" - umount $SCRATCH_MNT -} - -_block_filter() -{ - sed \ - -e 's/[0-9][0-9]*\.\.[0-9][0-9]*/BLOCKRANGE/g' \ - -e "s/blocksize $bsize/blocksize BSIZE/g" -} - -_init() -{ - echo "*** mkfs" - if ! _scratch_mkfs_xfs >$tmp.out 2>&1 - then - cat $tmp.out - echo "failed to mkfs $SCRATCH_DEV" - exit 1 - fi - - echo "*** mount" - if ! _scratch_mount - then - echo "failed to mount $SCRATCH_DEV" - exit 1 - fi -} - -_filesize() -{ - ls -l $1 | $AWK_PROG '{print "filesize = " $5}' -} - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -# real QA test starts here -_supported_fs xfs -_supported_os IRIX Linux - -_require_scratch - -_init -out=$SCRATCH_MNT/$$.tmp - -# since we're using a clean FS here, we make some assumptions -# about availability of contiguous blocks - -# also interesting to note is that ALLOC == FREE. seriously. -# the _length is ignored_ in irix. the file is allocated up -# to the specified offset, and zero filled if previously -# unallocated. the file is truncated at the specified point. - -echo "*** test 1 - reservations cleared on O_TRUNC" -rm -f $out -cat <$tmp.out - then - echo " holes returned $? - see $seq.out.full" - failed=1 - status=1 - fi - - - if [ $failed -eq 0 ] - then - # quick check - how many holes did we get? - count=`xfs_bmap $out | egrep -c ': hole'` - echo " $count hole(s) detected" - # and how big was the file? - _filesize $out - - if [ $count -ne $_count ] - then - echo " unexpected number of holes - see $seq.out.full" - status=1 - failed=1 - fi - fi - - if [ $failed -eq 1 ] - then - echo "--------------------------------------" >>$here/$seq.out.full - echo "$_n - output from holes:" >>$here/$seq.out.full - echo "--------------------------------------" >>$here/$seq.out.full - cat $tmp.out >>$here/$seq.out.full - echo "--------------------------------------" >>$here/$seq.out.full - echo "$_n - output from bmap:" >>$here/$seq.out.full - echo "--------------------------------------" >>$here/$seq.out.full - xfs_bmap -vvv $out >>$here/$seq.out.full - echo "--------------------------------------" >>$here/$seq.out.full - echo "$_n - output from ls -li:" >>$here/$seq.out.full - echo "--------------------------------------" >>$here/$seq.out.full - ls -li $out >>$here/$seq.out.full - status=1 - fi -} - -# real QA test starts here -_supported_fs xfs -_supported_os IRIX Linux - -_setup_testdir - -rm -f $here/$seq.out.full - -# small & fairly dense -_do_test 1 "-l 40960000 -b 40960 -i 10 -c 1" 100 - -# big & sparse -_do_test 2 "-l 409600000 -b 40960 -i 1000 -c 1" 10 - -# no holes, but a very nasty way to write a file (lots of extents) -_do_test 3 "-l 40960000 -b 40960 -i 10 -c 10" 0 - -exit diff --git a/012.out b/012.out deleted file mode 100644 index 6dc7ce86..00000000 --- a/012.out +++ /dev/null @@ -1,16 +0,0 @@ -QA output created by 012 - -holes.1 : -l 40960000 -b 40960 -i 10 -c 1 ------------------------------------------------ - 100 hole(s) detected - filesize = 40960000 - -holes.2 : -l 409600000 -b 40960 -i 1000 -c 1 ------------------------------------------------ - 10 hole(s) detected - filesize = 409600000 - -holes.3 : -l 40960000 -b 40960 -i 10 -c 10 ------------------------------------------------ - 0 hole(s) detected - filesize = 40960000 diff --git a/016 b/016 deleted file mode 100755 index 538ba14c..00000000 --- a/016 +++ /dev/null @@ -1,247 +0,0 @@ -#! /bin/bash -# FS QA Test No. 016 -# -# test end of log overwrite bug #796141 -# -#----------------------------------------------------------------------- -# Copyright (c) 2000-2003 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 -# -#----------------------------------------------------------------------- -# - -# -# pv 796141 -# -# create a new FS, mostly fill the log. Then wrap the log back to the -# start bit by bit to force wiping of stale blocks near the end of the -# log. Check the block after the log ends to check for corruption -# -# assumptions : -# - given we're only touching a single inode, the block after the -# log which is in the middle ag should never be touched. -# if it changes, we assume the log is writing over it -# - -seq=`basename $0` -echo "QA output created by $seq" - -here=`pwd` -tmp=/tmp/$$ -status=1 - -trap "_cleanup; exit \$status" 0 1 2 3 15 - -_cleanup() -{ - cd / - rm -f $tmp.* - echo "*** unmount" - umount $SCRATCH_MNT 2>/dev/null -} - -_block_filter() -{ - sed -e 's/[0-9][0-9]*\.\.[0-9][0-9]*/BLOCKRANGE/g' -} - -_init() -{ - echo "*** reset partition" - $here/src/devzero -b 2048 -n 50 -v 198 $SCRATCH_DEV - echo "*** mkfs" - force_opts="-dsize=50m -lsize=$log_size" - # - # Do not discard blocks as we check for patterns in free space. - # - # First, make sure that mkfs supports '-K' option by using its - # dry run (-N option) and then add it to the force_opts. - # - if _scratch_mkfs_xfs -N -K $force_opts >/dev/null 2>&1; then - force_opts="-K $force_opts" - fi - echo mkfs_xfs $force_opts $SCRATCH_DEV >>$seq.full - _scratch_mkfs_xfs $force_opts >$tmp.mkfs0 2>&1 - [ $? -ne 0 ] && \ - _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified" - _filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs - . $tmp.mkfs - [ $logsunit -ne 0 ] && \ - _notrun "Cannot run this test using log MKFS_OPTIONS specified" -} - -_log_traffic() -{ - count=$1 - echo "*** generate log traffic" - - out=$SCRATCH_MNT/$$.tmp - - echo " *** mount" - if ! _scratch_mount - then - echo "failed to mount $SCRATCH_DEV" - exit 1 - fi - - # having any quota enabled (acct/enfd) means extra log traffic - evil! - $here/src/feature -U $SCRATCH_DEV && \ - _notrun "UQuota are enabled, test needs controlled log traffic" - $here/src/feature -G $SCRATCH_DEV && \ - _notrun "GQuota are enabled, test needs controlled log traffic" - $here/src/feature -P $SCRATCH_DEV && \ - _notrun "PQuota are enabled, test needs controlled log traffic" - - echo " *** fiddle" - while [ $count -ge 0 ] - do - touch $out - sync - rm $out - sync - let "count = count - 1" - done - - echo " *** unmount" - if ! umount $SCRATCH_DEV - then - echo "failed to unmount $SCRATCH_DEV" - exit 1 - fi -} - -_log_size() -{ - _scratch_xfs_logprint -tb | $AWK_PROG ' - /log file: / || /log device: / { print $7} - ' -} - -_log_head() -{ - _scratch_xfs_logprint -tb | $AWK_PROG ' - /head:/ { print $5 } - ' -} - -# Get log stripe unit for v2 logs; if none specified, -# (or v1 log) just return "1" block - -_log_sunit() -{ - if [ ${lsunit:-0} -eq 0 ]; then - echo $dbsize - else - expr $lsunit \* $dbsize - fi -} - -_after_log() -{ - xfs_db -r $1 -c "sb" -c "print" | $AWK_PROG ' - /logstart/ { logstart = $3 } - /logblocks/ { logblocks = $3 } - END { - print logstart + logblocks - } - ' -} - -_check_corrupt() -{ - f="c6c6c6c6" - echo "*** check for corruption" - echo "expect $f..." >>$seq.full - xfs_db -r -c "fsblock $2" -c "print" $1 | head | tee -a $seq.full | \ - grep -q -v "$f $f $f $f $f $f $f $f" && \ - _fail "!!! block $2 corrupted!" -} - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -# real QA test starts here -_supported_fs xfs -_supported_os Linux - -rm -f $seq.full - -# mkfs sizes -log_size=2097152 -log_size_bb=`expr $log_size / 512` - -_require_scratch -_init - -block=`_after_log $SCRATCH_DEV` -echo "fsblock after log = $block" >>$seq.full -_check_corrupt $SCRATCH_DEV $block - -actual_log_size=`_log_size` -echo "log size = $actual_log_size BB" >>$seq.full -head=`_log_head` -echo "log position = $head" >>$seq.full -lsunit=`_log_sunit` -echo "log sunit = $lsunit" >>$seq.full - -# sanity checks -[ $actual_log_size -eq $log_size_bb ] || \ - _fail "!!! unexpected log size $size" -[ $head -eq 2 -o $head -eq $((lsunit/512)) ] || \ - _fail "!!! unexpected initial log position $head vs. $((lsunit/512))" - -# find how how many blocks per op for 100 ops -# ignore the fact that it will also include an unmount record etc... -# this should be small overall -echo " lots of traffic for sampling" >>$seq.full -sample_size_ops=100 -_log_traffic $sample_size_ops -head1=`_log_head` -num_blocks=`expr $head1 - $head` -blocks_per_op=`echo "scale=3; $num_blocks / $sample_size_ops" | bc` -echo "blocks_per_op = $blocks_per_op" >>$seq.full -num_expected_ops=`echo "$log_size_bb / $blocks_per_op" | bc` -echo "num_expected_ops = $num_expected_ops" >>$seq.full -num_expected_to_go=`echo "$num_expected_ops - $sample_size_ops" | bc` -echo "num_expected_to_go = $num_expected_to_go" >>$seq.full - -echo " lots more traffic" >>$seq.full -_log_traffic $num_expected_to_go -head=`_log_head` -echo "log position = $head" >>$seq.full - -# e.g. 3891 -near_end_min=`echo "0.95 * $log_size_bb" | bc | sed 's/\..*//'` -echo "near_end_min = $near_end_min" >>$seq.full - -[ $head -gt $near_end_min -a $head -lt $log_size_bb ] || \ - _fail "!!! unexpected near end log position $head" - -for c in `seq 0 20` -do - echo " little traffic" >>$seq.full - _log_traffic 2 - head=`_log_head` - echo "log position = $head" >>$seq.full - _check_corrupt $SCRATCH_DEV $block -done - -[ $head -lt 1000 ] || \ - _fail "!!! unexpected wrapped log position $head" - -# success, all done -status=0 -exit diff --git a/016.out b/016.out deleted file mode 100644 index f7844cdf..00000000 --- a/016.out +++ /dev/null @@ -1,119 +0,0 @@ -QA output created by 016 -*** reset partition -Wrote 51200.00Kb (value 0xc6) -*** mkfs -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** generate log traffic - *** mount - *** fiddle - *** unmount -*** check for corruption -*** unmount diff --git a/017 b/017 deleted file mode 100755 index 2b91b33f..00000000 --- a/017 +++ /dev/null @@ -1,94 +0,0 @@ -#! /bin/bash -# FS QA Test No. 017 -# -# test remount ro - pv 795642 -# -#----------------------------------------------------------------------- -# Copyright (c) 2000-2002 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 -# -#----------------------------------------------------------------------- -# - -seq=`basename $0` -echo "QA output created by $seq" - -here=`pwd` -tmp=/tmp/$$ -status=1 -trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15 - -_cleanup() -{ - echo "*** unmount" - umount $SCRATCH_MNT 2>/dev/null -} - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter - -# real QA test starts here -_supported_fs xfs -_supported_os Linux - -_require_scratch - -# xfs_db will OOM kill the machine if you don't have huge amounts of RAM, so -# don't run this on large filesystems. -_require_no_large_scratch_dev - -echo "*** init FS" - -rm -f $seq.full -umount $SCRATCH_DEV >/dev/null 2>&1 -echo "*** MKFS ***" >>$seq.full -echo "" >>$seq.full -_scratch_mkfs_xfs >>$seq.full 2>&1 \ - || _fail "mkfs failed" -_scratch_mount >>$seq.full 2>&1 \ - || _fail "mount failed" - -echo "*** test" - -for l in 0 1 2 3 4 -do - echo " *** test $l" - FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -n 1000 $FSSTRESS_AVOID` - $FSSTRESS_PROG $FSSTRESS_ARGS >>$seq.full - - _scratch_mount -o remount,ro \ - || _fail "remount ro failed" - - echo "" >>$seq.full - echo "*** xfs_logprint ***" >>$seq.full - echo "" >>$seq.full - _scratch_xfs_logprint -tb | tee -a $seq.full \ - | head | grep -q "" || _fail "DIRTY LOG" - - echo "" >>$seq.full - echo "*** XFS_CHECK ***" >>$seq.full - echo "" >>$seq.full - _scratch_xfs_check >>$seq.full 2>&1 \ - || _fail "xfs_check failed" - _scratch_mount -o remount,rw \ - || _fail "remount rw failed" -done - -echo "*** done" -# happy exit -rm -f $seq.full -status=0 -exit 0 diff --git a/017.out b/017.out deleted file mode 100644 index 2d11c949..00000000 --- a/017.out +++ /dev/null @@ -1,10 +0,0 @@ -QA output created by 017 -*** init FS -*** test - *** test 0 - *** test 1 - *** test 2 - *** test 3 - *** test 4 -*** done -*** unmount diff --git a/018 b/018 deleted file mode 100755 index 156cc1df..00000000 --- a/018 +++ /dev/null @@ -1,102 +0,0 @@ -#! /bin/bash -# FS QA Test No. 018 -# -# xfs_logprint test - test v2 logs of different LR sizes -# -#----------------------------------------------------------------------- -# Copyright (c) 2000-2002 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 -# -#----------------------------------------------------------------------- -# - -seq=`basename $0` -echo "QA output created by $seq" - -here=`pwd` -tmp=/tmp/$$ -status=1 # failure is the default! - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter -. ./common.log - -_cleanup() -{ - cd / - _cleanup_logfiles - rm -f $tmp.* - umount $SCRATCH_MNT 2>/dev/null -} -trap "_cleanup; exit \$status" 0 1 2 3 15 - -# real QA test starts here -_supported_fs xfs -_supported_os IRIX Linux -# prelim -rm -f $seq.full $tmp.* -_require_scratch -_require_v2log - -# link correct .out file -_link_out_file $seq.op - - -echo "*** init FS" -umount $SCRATCH_DEV >/dev/null 2>&1 - -cat >$tmp.seq.params < - log device: daddr: length: -Oper (OPNUM): tid: len: clientid: TRANS flags: START -Oper (OPNUM): tid: len: clientid: TRANS flags: none -TRAN: type: CREATE (0x4) tid: num_items: 5 -Oper (OPNUM): tid: len: clientid: TRANS flags: none -BUF: #regs:R start blkno: () len: bmap size: 1 -Oper (OPNUM): tid: len: clientid: TRANS flags: none -AGI Buffer: XAGI -ver: 1 seq#: 0 len: cnt: 64 root: 3 -level: 1 free#: 0x3c newino: -bucket[0 - 3]: 0xffffffff 0xffffffff 0xffffffff 0xffffffff -bucket[4 - 7]: 0xffffffff 0xffffffff 0xffffffff 0xffffffff -bucket[8 - 11]: 0xffffffff 0xffffffff 0xffffffff 0xffffffff -bucket[12 - 15]: 0xffffffff 0xffffffff 0xffffffff 0xffffffff -bucket[16 - 19]: 0xffffffff -Oper (OPNUM): tid: len: clientid: TRANS flags: none -BUF: #regs:R start blkno: () len: bmap size: 2 -Oper (OPNUM): tid: len: clientid: TRANS flags: none -BUF DATA -Oper (OPNUM): tid: len: clientid: TRANS flags: none -INODE: #regs:R ino: flags: 0x1 dsize: 0 - blkno: len: boff: -Oper (OPNUM): tid: len: clientid: TRANS flags: none -INODE CORE -magic 0x494e mode 0100644 version 1 format 2 -nlink 1 uid 0 gid 0 -atime