generic: relocate xfs shutdown tests into tests/generic/
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 12 Feb 2015 03:20:27 +0000 (14:20 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 12 Feb 2015 03:20:27 +0000 (14:20 +1100)
This patch moves the generic testcases defined in xfs into
tests/generic/.

  xfs/053 -> generic/042
  xfs/137 -> generic/043
  xfs/138 -> generic/044
  xfs/139 -> generic/045
  xfs/140 -> generic/046
  xfs/179 -> generic/047
  xfs/180 -> generic/048
  xfs/182 -> generic/049
  xfs/200 -> generic/050
  xfs/306 -> generic/051

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
42 files changed:
tests/generic/042 [new file with mode: 0755]
tests/generic/042.out [new file with mode: 0644]
tests/generic/043 [new file with mode: 0755]
tests/generic/043.out [new file with mode: 0644]
tests/generic/044 [new file with mode: 0755]
tests/generic/044.out [new file with mode: 0644]
tests/generic/045 [new file with mode: 0755]
tests/generic/045.out [new file with mode: 0644]
tests/generic/046 [new file with mode: 0755]
tests/generic/046.out [new file with mode: 0644]
tests/generic/047 [new file with mode: 0755]
tests/generic/047.out [new file with mode: 0644]
tests/generic/048 [new file with mode: 0755]
tests/generic/048.out [new file with mode: 0644]
tests/generic/049 [new file with mode: 0755]
tests/generic/049.out [new file with mode: 0644]
tests/generic/050 [new file with mode: 0755]
tests/generic/050.out [new file with mode: 0644]
tests/generic/051 [new file with mode: 0755]
tests/generic/051.out [new file with mode: 0644]
tests/generic/group
tests/xfs/053 [deleted file]
tests/xfs/053.out [deleted file]
tests/xfs/137 [deleted file]
tests/xfs/137.out [deleted file]
tests/xfs/138 [deleted file]
tests/xfs/138.out [deleted file]
tests/xfs/139 [deleted file]
tests/xfs/139.out [deleted file]
tests/xfs/140 [deleted file]
tests/xfs/140.out [deleted file]
tests/xfs/179 [deleted file]
tests/xfs/179.out [deleted file]
tests/xfs/180 [deleted file]
tests/xfs/180.out [deleted file]
tests/xfs/182 [deleted file]
tests/xfs/182.out [deleted file]
tests/xfs/200 [deleted file]
tests/xfs/200.out [deleted file]
tests/xfs/306 [deleted file]
tests/xfs/306.out [deleted file]
tests/xfs/group

diff --git a/tests/generic/042 b/tests/generic/042
new file mode 100755 (executable)
index 0000000..6eecbdc
--- /dev/null
@@ -0,0 +1,102 @@
+#! /bin/bash
+# FS QA Test No. 042
+#
+# Test stale data exposure via writeback using various file allocation
+# modification commands. The presumption is that such commands result in partial
+# writeback and can convert a delayed allocation extent, that might be larger
+# than the ranged affected by fallocate, to a normal extent. If the fs happens
+# to crash sometime between when the extent modification is logged and writeback
+# occurs for dirty pages within the extent but outside of the fallocated range,
+# stale data exposure can occur.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2014 Red Hat, 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`
+seqres=$RESULT_DIR/$seq
+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
+
+_cleanup()
+{
+       cd /
+       rm -f $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/punch
+
+# real QA test starts here
+rm -f $seqres.full
+
+_crashtest()
+{
+       cmd=$1
+       img=$SCRATCH_MNT/$seq.img
+       mnt=$SCRATCH_MNT/$seq.mnt
+       file=$mnt/file
+
+       # Create an fs on a small, initialized image. The pattern is written to
+       # the image to detect stale data exposure.
+       $XFS_IO_PROG -f -c "truncate 0" -c "pwrite 0 25M" $img \
+               >> $seqres.full 2>&1
+       _mkfs_dev $img >> $seqres.full 2>&1
+
+       mkdir -p $mnt
+       _mount $img $mnt
+
+       echo $cmd
+
+       # write, run the test command and shutdown the fs
+       $XFS_IO_PROG -f -c "pwrite -S 1 0 64k" -c "$cmd 60k 4k" $file | \
+               _filter_xfs_io
+       ./src/godown -f $mnt
+
+       $UMOUNT_PROG $mnt
+       _mount $img $mnt
+
+       # we generally expect a zero-sized file (this should be silent)
+       hexdump $file
+
+       $UMOUNT_PROG $mnt
+}
+
+# Modify as appropriate.
+_supported_fs generic
+_supported_os Linux
+_require_scratch
+_require_scratch_shutdown
+_require_xfs_io_command "falloc"
+_require_xfs_io_command "fpunch"
+_require_xfs_io_command "fzero"
+
+_scratch_mkfs >/dev/null 2>&1
+_scratch_mount
+
+_crashtest "falloc -k"
+_crashtest "fpunch"
+_crashtest "fzero -k"
+
+status=0
+exit
diff --git a/tests/generic/042.out b/tests/generic/042.out
new file mode 100644 (file)
index 0000000..c1130e1
--- /dev/null
@@ -0,0 +1,10 @@
+QA output created by 042
+falloc -k
+wrote 65536/65536 bytes at offset 0
+XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+fpunch
+wrote 65536/65536 bytes at offset 0
+XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+fzero -k
+wrote 65536/65536 bytes at offset 0
+XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
diff --git a/tests/generic/043 b/tests/generic/043
new file mode 100755 (executable)
index 0000000..47bc766
--- /dev/null
@@ -0,0 +1,106 @@
+#! /bin/bash
+# FSQA Test No. 043
+#
+# Test for NULL files problem
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2006 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`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "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 IRIX
+
+_require_scratch
+_require_scratch_shutdown
+_require_fiemap
+_scratch_mkfs >/dev/null 2>&1
+_scratch_mount
+
+# create files
+i=1;
+while [ $i -lt 1000 ]
+do
+       file=$SCRATCH_MNT/$i
+       xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file > /dev/null
+       if [ $? -ne 0 ]
+       then
+               echo error creating/writing file $file
+               exit
+       fi
+       let i=$i+1
+done
+
+# give the system a chance to write something out
+sleep 10
+
+src/godown $SCRATCH_MNT
+
+umount $SCRATCH_MNT
+_scratch_mount
+umount $SCRATCH_MNT
+if [ ! _check_scratch_fs ]
+then
+       echo error detected in filesystem
+       exit
+fi
+_scratch_mount
+
+# check file size and contents
+i=1;
+while [ $i -lt 1000 ]
+do
+       file=$SCRATCH_MNT/$i
+       # if file does not exist, the create was not logged, skip it
+       if [ -e $file ]
+       then
+               # if file size is zero it cannot be corrupt, skip it
+               if [ -s $file ]
+               then
+                       # if file has non-zero size but no extents then it's contents will be NULLs, bad.
+                       num_extents=`_count_extents $file`
+                       num_holes=`_count_holes $file`
+                       if [ $num_extents -eq 0 ]; then
+                               echo corrupt file $file - non-zero size but no extents
+                       elif [ $num_holes -ne 0 ]; then
+                               echo corrupt file $file - contains holes
+                       else
+                               rm -f $file
+                       fi
+               else
+                       rm -f $file
+               fi
+       fi
+       let i=$i+1
+done
+
+status=0
+exit
diff --git a/tests/generic/043.out b/tests/generic/043.out
new file mode 100644 (file)
index 0000000..7851fbe
--- /dev/null
@@ -0,0 +1 @@
+QA output created by 043
diff --git a/tests/generic/044 b/tests/generic/044
new file mode 100755 (executable)
index 0000000..c59aaf3
--- /dev/null
@@ -0,0 +1,112 @@
+#! /bin/bash
+# FSQA Test No. 044
+#
+# Test for NULL files problem
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2006 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`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "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 IRIX
+
+_require_scratch
+_require_scratch_shutdown
+_require_fiemap
+_scratch_mkfs >/dev/null 2>&1
+_scratch_mount
+
+# create files
+i=1;
+while [ $i -lt 1000 ]
+do
+       file=$SCRATCH_MNT/$i
+       xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file > /dev/null
+       if [ $? -ne 0 ]
+       then
+               echo error creating/writing file $file
+               exit
+       fi
+       xfs_io -c "truncate 64k" $file > /dev/null
+       if [ $? -ne 0 ]
+       then
+               echo error truncating file $file
+               exit
+       fi
+       let i=$i+1
+done
+
+# give the system a chance to write something out
+sleep 10
+
+src/godown $SCRATCH_MNT
+
+umount $SCRATCH_MNT
+_scratch_mount
+umount $SCRATCH_MNT
+if [ ! _check_scratch_fs ]
+then
+       echo error detected in filesystem
+       exit
+fi
+_scratch_mount
+
+# check file size and contents
+i=1;
+while [ $i -lt 1000 ]
+do
+       file=$SCRATCH_MNT/$i
+       # if file does not exist, the create was not logged, skip it
+       if [ -e $file ]
+       then
+               # if file size is zero it cannot be corrupt, skip it
+               if [ -s $file ]
+               then
+                       # if file has non-zero size but no extents then it's contents will be NULLs, bad.
+                       num_extents=`_count_extents $file`
+                       num_holes=`_count_holes $file`
+                       if [ $num_extents -eq 0 ]; then
+                               echo corrupt file $file - non-zero size but no extents
+                       elif [ $num_holes -ne 0 ]; then
+                               echo corrupt file $file - contains holes
+                       else
+                               rm -f $file
+                       fi
+               else
+                       rm -f $file
+               fi
+       fi
+       let i=$i+1
+done
+
+status=0
+exit
diff --git a/tests/generic/044.out b/tests/generic/044.out
new file mode 100644 (file)
index 0000000..ef9885b
--- /dev/null
@@ -0,0 +1 @@
+QA output created by 044
diff --git a/tests/generic/045 b/tests/generic/045
new file mode 100755 (executable)
index 0000000..6c601a6
--- /dev/null
@@ -0,0 +1,112 @@
+#! /bin/bash
+# FSQA Test No. 045
+#
+# Test for NULL files problem
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2006 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`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "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 IRIX
+
+_require_scratch
+_require_scratch_shutdown
+_require_fiemap
+_scratch_mkfs >/dev/null 2>&1
+_scratch_mount
+
+# create files
+i=1;
+while [ $i -lt 1000 ]
+do
+       file=$SCRATCH_MNT/$i
+       xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file > /dev/null
+       if [ $? -ne 0 ]
+       then
+               echo error creating/writing file $file
+               exit
+       fi
+       xfs_io -c "truncate 32k" $file > /dev/null
+       if [ $? -ne 0 ]
+       then
+               echo error truncating file $file
+               exit
+       fi
+       let i=$i+1
+done
+
+# give the system a chance to write something out
+sleep 10
+
+src/godown $SCRATCH_MNT
+
+umount $SCRATCH_MNT
+_scratch_mount
+umount $SCRATCH_MNT
+if [ ! _check_scratch_fs ]
+then
+       echo error detected in filesystem
+       exit
+fi
+_scratch_mount
+
+# check file size and contents
+i=1;
+while [ $i -lt 1000 ]
+do
+       file=$SCRATCH_MNT/$i
+       # if file does not exist, the create was not logged, skip it
+       if [ -e $file ]
+       then
+               # if file size is zero it cannot be corrupt, skip it
+               if [ -s $file ]
+               then
+                       # if file has non-zero size but no extents then it's contents will be NULLs, bad.
+                       num_extents=`_count_extents $file`
+                       num_holes=`_count_holes $file`
+                       if [ $num_extents -eq 0 ]; then
+                               echo corrupt file $file - non-zero size but no extents
+                       elif [ $num_holes -ne 0 ]; then
+                               echo corrupt file $file - contains holes
+                       else
+                               rm -f $file
+                       fi
+               else
+                       rm -f $file
+               fi
+       fi
+       let i=$i+1
+done
+
+status=0
+exit
diff --git a/tests/generic/045.out b/tests/generic/045.out
new file mode 100644 (file)
index 0000000..5b0d489
--- /dev/null
@@ -0,0 +1 @@
+QA output created by 045
diff --git a/tests/generic/046 b/tests/generic/046
new file mode 100755 (executable)
index 0000000..76993d4
--- /dev/null
@@ -0,0 +1,109 @@
+#! /bin/bash
+# FSQA Test No. 046
+#
+# Test for NULL files problem
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2006 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`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "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 IRIX
+
+_require_scratch
+_require_scratch_shutdown
+_require_fiemap
+_scratch_mkfs >/dev/null 2>&1
+_scratch_mount
+
+# create files
+i=1;
+while [ $i -lt 1000 ]
+do
+       file=$SCRATCH_MNT/$i
+       xfs_io -f -c "pwrite -b 32k -S 0xff 0 32k" $file > /dev/null
+       if [ $? -ne 0 ]
+       then
+               echo error creating/writing file $file
+               exit
+       fi
+       xfs_io -c "truncate 64k" $file > /dev/null
+       if [ $? -ne 0 ]
+       then
+               echo error truncating file $file
+               exit
+       fi
+       let i=$i+1
+done
+
+# give the system a chance to write something out
+sleep 10
+
+src/godown $SCRATCH_MNT
+
+umount $SCRATCH_MNT
+_scratch_mount
+umount $SCRATCH_MNT
+if [ ! _check_scratch_fs ]
+then
+       echo error detected in filesystem
+       exit
+fi
+_scratch_mount
+
+# check file size and contents
+i=1;
+while [ $i -lt 1000 ]
+do
+       file=$SCRATCH_MNT/$i
+       # if file does not exist, the create was not logged, skip it
+       if [ -e $file ]
+       then
+               # if file size is zero it cannot be corrupt, skip it
+               if [ -s $file ]
+               then
+                       # if file has non-zero size but no extents then it's contents will be NULLs, bad.
+                       num_extents=`_count_extents $file`
+                       if [ $num_extents -eq 0 ]; then
+                               echo corrupt file $file - non-zero size but no extents
+                       else
+                               rm -f $file
+                       fi
+               else
+                       rm -f $file
+               fi
+       fi
+       let i=$i+1
+done
+
+status=0
+exit
diff --git a/tests/generic/046.out b/tests/generic/046.out
new file mode 100644 (file)
index 0000000..a14e592
--- /dev/null
@@ -0,0 +1 @@
+QA output created by 046
diff --git a/tests/generic/047 b/tests/generic/047
new file mode 100755 (executable)
index 0000000..0418a3b
--- /dev/null
@@ -0,0 +1,107 @@
+#! /bin/bash
+# FSQA Test No. 047
+#
+# Test for NULL files problem
+# test inode size is on disk after fsync
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2006 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`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "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 IRIX
+
+_require_scratch
+_require_scratch_shutdown
+_require_fiemap
+_scratch_mkfs >/dev/null 2>&1
+_scratch_mount
+
+_check_files()
+{
+       # check file size and contents
+       i=1;
+       while [ $i -lt 1000 ]
+       do
+               file=$SCRATCH_MNT/$i
+               # if file is missing then fsync failed
+               if [ -e $file ]
+               then
+                       # if file size is not 32KB then fsync failed
+                       if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 32768 ]
+                       then
+                               # if file has non-zero size but no extents then it's contents will be NULLs, bad.
+                               num_extents=`_count_extents $file`
+                               if [ $num_extents -eq 0 ]; then
+                                       echo corrupt file $file - non-zero size but no extents
+                               else
+                                       rm -f $file
+                               fi
+                       else
+                               echo file $file has incorrect size - fsync failed
+                       fi
+               else
+                       echo file $file missing - fsync failed
+               fi
+               let i=$i+1
+       done
+}
+
+# create files and fsync them
+i=1;
+while [ $i -lt 1000 ]
+do
+       file=$SCRATCH_MNT/$i
+       xfs_io -f -c "pwrite -b 32k -S 0xff 0 32k" -c "fsync" $file > /dev/null
+       if [ $? -ne 0 ]
+       then
+               echo error creating/writing file $file
+               exit
+       fi
+       let i=$i+1
+done
+
+# shutdown immediately after, then remount and test
+src/godown $SCRATCH_MNT
+umount $SCRATCH_MNT
+_scratch_mount
+umount $SCRATCH_MNT
+if [ ! _check_scratch_fs ]
+then
+       echo error detected in filesystem
+       exit
+fi
+_scratch_mount
+_check_files
+
+status=0
+exit
diff --git a/tests/generic/047.out b/tests/generic/047.out
new file mode 100644 (file)
index 0000000..58e2353
--- /dev/null
@@ -0,0 +1 @@
+QA output created by 047
diff --git a/tests/generic/048 b/tests/generic/048
new file mode 100755 (executable)
index 0000000..558fe5f
--- /dev/null
@@ -0,0 +1,111 @@
+#! /bin/bash
+# FSQA Test No. 048
+#
+# Test for NULL files problem
+# test inode size is on disk after sync
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2006 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`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "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 IRIX
+
+_require_scratch
+_require_scratch_shutdown
+_require_fiemap
+_scratch_mkfs >/dev/null 2>&1
+_scratch_mount
+
+# Do we have enough space on disk?  10G
+_require_fs_space $SCRATCH_MNT 10485760
+
+_check_files()
+{
+       # check file size and contents
+       i=1;
+       while [ $i -lt 1000 ]
+       do
+               file=$SCRATCH_MNT/$i
+               # if file is missing then sync failed
+               if [ -e $file ]
+               then
+                       # if file size is not 10MB then sync failed
+                       if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 10485760 ]
+                       then
+                               # if file has non-zero size but no extents then it's contents will be NULLs, bad.
+                               num_extents=`_count_extents $file`
+                               if [ $num_extents -eq 0 ]; then
+                                       echo corrupt file $file - non-zero size but no extents
+                               else
+                                       rm -f $file
+                               fi
+                       else
+                               echo file $file has incorrect size - sync failed
+                       fi
+               else
+                       echo file $file missing - sync failed
+               fi
+               let i=$i+1
+       done
+}
+
+# create files and sync them
+i=1;
+while [ $i -lt 1000 ]
+do
+       file=$SCRATCH_MNT/$i
+       xfs_io -f -c "pwrite -b 64k -S 0xff 0 10m" $file > /dev/null
+       if [ $? -ne 0 ]
+       then
+               echo error creating/writing file $file
+               exit
+       fi
+       let i=$i+1
+done
+
+# sync, then shutdown immediately after, then remount and test
+sync
+src/godown $SCRATCH_MNT
+umount $SCRATCH_MNT
+_scratch_mount
+umount $SCRATCH_MNT
+if [ ! _check_scratch_fs ]
+then
+       echo error detected in filesystem
+       exit
+fi
+_scratch_mount
+_check_files
+
+status=0
+exit
diff --git a/tests/generic/048.out b/tests/generic/048.out
new file mode 100644 (file)
index 0000000..7554630
--- /dev/null
@@ -0,0 +1 @@
+QA output created by 048
diff --git a/tests/generic/049 b/tests/generic/049
new file mode 100755 (executable)
index 0000000..646d39e
--- /dev/null
@@ -0,0 +1,108 @@
+#! /bin/bash
+# FSQA Test No. 049
+#
+# Test for NULL files problem
+# test inode size is on disk after sync - expose log replay bug
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2006 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`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "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 IRIX
+
+_require_scratch
+_require_scratch_shutdown
+_require_fiemap
+_scratch_mkfs >/dev/null 2>&1
+_scratch_mount
+
+_check_files()
+{
+       # check file size and contents
+       i=1;
+       while [ $i -lt 1000 ]
+       do
+               file=$SCRATCH_MNT/$i
+               # if file is missing then sync failed
+               if [ -e $file ]
+               then
+                       # if file size is not 32KB then sync failed
+                       if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 32768 ]
+                       then
+                               # if file has non-zero size but no extents then it's contents will be NULLs, bad.
+                               num_extents=`_count_extents $file`
+                               if [ $num_extents -eq 0 ]; then
+                                       echo corrupt file $file - non-zero size but no extents
+                               else
+                                       rm -f $file
+                               fi
+                       else
+                               echo file $file has incorrect size - sync failed
+                       fi
+               else
+                       echo file $file missing - sync failed
+               fi
+               let i=$i+1
+       done
+}
+
+# create files and sync them
+i=1;
+while [ $i -lt 1000 ]
+do
+       file=$SCRATCH_MNT/$i
+       xfs_io -f -c "pwrite -b 32k -S 0xff 0 32k" $file > /dev/null
+       if [ $? -ne 0 ]
+       then
+               echo error creating/writing file $file
+               exit
+       fi
+       let i=$i+1
+done
+
+# sync, then shutdown immediately after, then remount and test
+sync
+src/godown $SCRATCH_MNT
+umount $SCRATCH_MNT
+_scratch_mount
+umount $SCRATCH_MNT
+if [ ! _check_scratch_fs ]
+then
+       echo error detected in filesystem
+       exit
+fi
+_scratch_mount
+_check_files
+
+status=0
+exit
diff --git a/tests/generic/049.out b/tests/generic/049.out
new file mode 100644 (file)
index 0000000..cb0061b
--- /dev/null
@@ -0,0 +1 @@
+QA output created by 049
diff --git a/tests/generic/050 b/tests/generic/050
new file mode 100755 (executable)
index 0000000..a32e049
--- /dev/null
@@ -0,0 +1,127 @@
+#! /bin/bash
+# FS QA Test No. 050
+#
+# Check out various mount/remount/unmount scenarious on a read-only blockdev.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2009 Christoph Hellwig.
+#
+# 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`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1       # failure is the default!
+
+_cleanup()
+{
+       cd /
+       blockdev --setrw $SCRATCH_DEV
+}
+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 generic
+_supported_os Linux
+
+_require_scratch_nocheck
+_require_scratch_shutdown
+_require_norecovery
+
+_scratch_mkfs >/dev/null 2>&1
+
+#
+# Mark the device read-only
+#
+echo "setting device read-only"
+blockdev --setro $SCRATCH_DEV
+
+#
+# Mount it, and make sure we can't write to it, and we can unmount it again
+#
+echo "mounting read-only block device:"
+_scratch_mount 2>&1 | _filter_scratch | _filter_ro_mount
+
+echo "touching file on read-only filesystem (should fail)"
+touch $SCRATCH_MNT/foo 2>&1 | _filter_scratch
+
+#
+# Apparently this used to be broken at some point:
+#      http://oss.sgi.com/bugzilla/show_bug.cgi?id=807
+#
+echo "unmounting read-only filesystem"
+umount $SCRATCH_MNT 2>&1 | _filter_scratch
+
+echo "setting device read-write"
+blockdev --setrw $SCRATCH_DEV
+
+echo "mounting read-write block device:"
+_scratch_mount 2>&1 | _filter_scratch
+
+echo "touch files"
+touch $SCRATCH_MNT/{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}
+
+echo "going down:"
+src/godown -f $SCRATCH_MNT
+
+echo "unmounting shutdown filesystem:"
+umount $SCRATCH_MNT 2>&1 | _filter_scratch
+
+echo "setting device read-only"
+blockdev --setro $SCRATCH_DEV
+
+#
+# Mounting a filesystem that requires log-recovery fails unless
+# -o norecovery is used.
+#
+echo "mounting filesystem that needs recovery on a read-only device:"
+_scratch_mount 2>&1 | _filter_scratch | _filter_ro_mount
+
+echo "unmounting read-only filesystem"
+umount $SCRATCH_MNT 2>&1 | _filter_scratch
+
+#
+# This is the way out if the underlying device really is read-only.
+# Doesn't mean it's a good idea in practive, more a last resort
+# data recovery hack.
+#
+echo "mounting filesystem with -o norecovery on a read-only device:"
+_scratch_mount -o norecovery 2>&1 | _filter_scratch | _filter_ro_mount
+
+echo "unmounting read-only filesystem"
+umount $SCRATCH_MNT 2>&1 | _filter_scratch
+
+echo "setting device read-write"
+blockdev --setrw $SCRATCH_DEV
+
+#
+# But log recovery is performed when mount with -o ro as long as
+# the underlying device is not write protected.
+#
+echo "mounting filesystem that needs recovery with -o ro:"
+_scratch_mount -o ro 2>&1 | _filter_scratch
+
+# success, all done
+echo "*** done"
+rm -f $seqres.full
+status=0
diff --git a/tests/generic/050.out b/tests/generic/050.out
new file mode 100644 (file)
index 0000000..f8dbb7a
--- /dev/null
@@ -0,0 +1,24 @@
+QA output created by 050
+setting device read-only
+mounting read-only block device:
+mount: SCRATCH_DEV is write-protected, mounting read-only
+touching file on read-only filesystem (should fail)
+touch: cannot touch 'SCRATCH_MNT/foo': Read-only file system
+unmounting read-only filesystem
+setting device read-write
+mounting read-write block device:
+touch files
+going down:
+unmounting shutdown filesystem:
+setting device read-only
+mounting filesystem that needs recovery on a read-only device:
+mount: SCRATCH_DEV is write-protected, mounting read-only
+mount: cannot mount SCRATCH_DEV read-only
+unmounting read-only filesystem
+umount: SCRATCH_MNT: not mounted
+mounting filesystem with -o norecovery on a read-only device:
+mount: SCRATCH_DEV is write-protected, mounting read-only
+unmounting read-only filesystem
+setting device read-write
+mounting filesystem that needs recovery with -o ro:
+*** done
diff --git a/tests/generic/051 b/tests/generic/051
new file mode 100755 (executable)
index 0000000..614939f
--- /dev/null
@@ -0,0 +1,105 @@
+#!/bin/bash
+# FS QA Test No. 051
+#
+# Basic log recovery stress test - do lots of stuff, shut down in the middle of
+# it and check that recovery runs to completion and everything can be
+# successfully removed afterwards..
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2013 Red Hat, 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`
+seqres=$RESULT_DIR/$seq
+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
+
+_cleanup()
+{
+       cd /
+       umount $SCRATCH_MNT 2>/dev/null
+       rm -f $tmp.*
+}
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+# real QA test starts here
+_supported_fs generic
+_supported_os Linux
+
+_require_scratch
+_require_scratch_shutdown
+
+rm -f $seqres.full
+
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount
+
+SLEEP_TIME=$((30 * $TIME_FACTOR))
+PROCS=$((2 * LOAD_FACTOR))
+
+load_dir=$SCRATCH_MNT/test
+
+# let this run for a while
+$FSSTRESS_PROG -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
+sleep $SLEEP_TIME
+killall -q $FSSTRESS_PROG
+wait
+sync
+umount $SCRATCH_MNT
+
+# now mount again, run the load again, this time with a shutdown.
+_scratch_mount
+$XFS_FSR_PROG -v $load_dir >> $seqres.full 2>&1
+$FSSTRESS_PROG -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
+sleep $SLEEP_TIME
+sync
+
+# now shutdown and unmount
+sleep 5
+$here/src/godown $load_dir
+killall -q $FSSTRESS_PROG
+wait
+
+# for some reason fsstress processes manage to live on beyond the wait?
+sleep 5
+umount $SCRATCH_MNT
+
+# now recover, check the filesystem for consistency
+_scratch_mount
+umount $SCRATCH_MNT
+_check_scratch_fs
+
+# now clean up.
+_scratch_mount
+for d in $load_dir/*; do
+        rm -rf $d > /dev/null 2>&1 &
+done
+wait
+umount $SCRATCH_MNT
+
+echo "No output is good. Failures are loud."
+
+status=0
+exit
diff --git a/tests/generic/051.out b/tests/generic/051.out
new file mode 100644 (file)
index 0000000..daf2e6a
--- /dev/null
@@ -0,0 +1,2 @@
+QA output created by 051
+No output is good. Failures are loud.
index fb67b574f8952a42e1d5ed74a40ba57e7b560822..d38240e87e34df002dd325d260ebd42392715cc2 100644 (file)
 039 metadata auto quick
 040 metadata auto quick
 041 metadata auto quick
+042 auto quick rw
+043 metadata log auto
+044 metadata log auto
+045 metadata log auto
+046 metadata log auto
+047 metadata rw auto
+048 metadata rw auto
+049 metadata rw auto
+050 mount auto quick
+051 auto stress log metadata repair
 053 acl repair auto quick
 062 attr udf auto quick
 068 other auto freeze dangerous stress
diff --git a/tests/xfs/053 b/tests/xfs/053
deleted file mode 100755 (executable)
index 6428d5c..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 053
-#
-# Test stale data exposure via writeback using various file allocation
-# modification commands. The presumption is that such commands result in partial
-# writeback and can convert a delayed allocation extent, that might be larger
-# than the ranged affected by fallocate, to a normal extent. If the fs happens
-# to crash sometime between when the extent modification is logged and writeback
-# occurs for dirty pages within the extent but outside of the fallocated range,
-# stale data exposure can occur.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2014 Red Hat, 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`
-seqres=$RESULT_DIR/$seq
-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
-
-_cleanup()
-{
-       cd /
-       rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-. ./common/punch
-
-# real QA test starts here
-rm -f $seqres.full
-
-_crashtest()
-{
-       cmd=$1
-       img=$SCRATCH_MNT/$seq.img
-       mnt=$SCRATCH_MNT/$seq.mnt
-       file=$mnt/file
-
-       # Create an fs on a small, initialized image. The pattern is written to
-       # the image to detect stale data exposure.
-       $XFS_IO_PROG -f -c "truncate 0" -c "pwrite 0 25M" $img \
-               >> $seqres.full 2>&1
-       _mkfs_dev $img >> $seqres.full 2>&1
-
-       mkdir -p $mnt
-       _mount $img $mnt
-
-       echo $cmd
-
-       # write, run the test command and shutdown the fs
-       $XFS_IO_PROG -f -c "pwrite -S 1 0 64k" -c "$cmd 60k 4k" $file | \
-               _filter_xfs_io
-       ./src/godown -f $mnt
-
-       $UMOUNT_PROG $mnt
-       _mount $img $mnt
-
-       # we generally expect a zero-sized file (this should be silent)
-       hexdump $file
-
-       $UMOUNT_PROG $mnt
-}
-
-# Modify as appropriate.
-_supported_fs xfs
-_supported_os Linux
-_require_scratch
-_require_scratch_shutdown
-_require_xfs_io_command "falloc"
-_require_xfs_io_command "fpunch"
-_require_xfs_io_command "fzero"
-
-_scratch_mkfs >/dev/null 2>&1
-_scratch_mount
-
-_crashtest "falloc -k"
-_crashtest "fpunch"
-_crashtest "fzero -k"
-
-status=0
-exit
diff --git a/tests/xfs/053.out b/tests/xfs/053.out
deleted file mode 100644 (file)
index c777fe2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-QA output created by 053
-falloc -k
-wrote 65536/65536 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-fpunch
-wrote 65536/65536 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-fzero -k
-wrote 65536/65536 bytes at offset 0
-XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
diff --git a/tests/xfs/137 b/tests/xfs/137
deleted file mode 100755 (executable)
index eb9a5fa..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-#! /bin/bash
-# FSQA Test No. 137
-#
-# Test for NULL files problem
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2006 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`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "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 IRIX
-
-_require_scratch
-_require_scratch_shutdown
-_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
-_scratch_mount
-
-# create files
-i=1;
-while [ $i -lt 1000 ]
-do
-       file=$SCRATCH_MNT/$i
-       xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file > /dev/null
-       if [ $? -ne 0 ]
-       then
-               echo error creating/writing file $file
-               exit
-       fi
-       let i=$i+1
-done
-
-# give the system a chance to write something out
-sleep 10
-
-src/godown $SCRATCH_MNT
-
-umount $SCRATCH_MNT
-_scratch_mount
-umount $SCRATCH_MNT
-if [ ! _check_scratch_fs ]
-then
-       echo error detected in filesystem
-       exit
-fi
-_scratch_mount
-
-# check file size and contents
-i=1;
-while [ $i -lt 1000 ]
-do
-       file=$SCRATCH_MNT/$i
-       # if file does not exist, the create was not logged, skip it
-       if [ -e $file ]
-       then
-               # if file size is zero it cannot be corrupt, skip it
-               if [ -s $file ]
-               then
-                       # if file has non-zero size but no extents then it's contents will be NULLs, bad.
-                       num_extents=`_count_extents $file`
-                       num_holes=`_count_holes $file`
-                       if [ $num_extents -eq 0 ]; then
-                               echo corrupt file $file - non-zero size but no extents
-                       elif [ $num_holes -ne 0 ]; then
-                               echo corrupt file $file - contains holes
-                       else
-                               rm -f $file
-                       fi
-               else
-                       rm -f $file
-               fi
-       fi
-       let i=$i+1
-done
-
-status=0
-exit 
diff --git a/tests/xfs/137.out b/tests/xfs/137.out
deleted file mode 100644 (file)
index 0fd8b81..0000000
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 137
diff --git a/tests/xfs/138 b/tests/xfs/138
deleted file mode 100755 (executable)
index 809a8ee..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-#! /bin/bash
-# FSQA Test No. 138
-#
-# Test for NULL files problem
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2006 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`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "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 IRIX
-
-_require_scratch
-_require_scratch_shutdown
-_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
-_scratch_mount
-
-# create files
-i=1;
-while [ $i -lt 1000 ]
-do
-       file=$SCRATCH_MNT/$i
-       xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file > /dev/null
-       if [ $? -ne 0 ]
-       then
-               echo error creating/writing file $file
-               exit
-       fi
-       xfs_io -c "truncate 64k" $file > /dev/null
-       if [ $? -ne 0 ]
-       then
-               echo error truncating file $file
-               exit
-       fi
-       let i=$i+1
-done
-
-# give the system a chance to write something out
-sleep 10
-
-src/godown $SCRATCH_MNT
-
-umount $SCRATCH_MNT
-_scratch_mount
-umount $SCRATCH_MNT
-if [ ! _check_scratch_fs ]
-then
-       echo error detected in filesystem
-       exit
-fi
-_scratch_mount
-
-# check file size and contents
-i=1;
-while [ $i -lt 1000 ]
-do
-       file=$SCRATCH_MNT/$i
-       # if file does not exist, the create was not logged, skip it
-       if [ -e $file ]
-       then
-               # if file size is zero it cannot be corrupt, skip it
-               if [ -s $file ]
-               then
-                       # if file has non-zero size but no extents then it's contents will be NULLs, bad.
-                       num_extents=`_count_extents $file`
-                       num_holes=`_count_holes $file`
-                       if [ $num_extents -eq 0 ]; then
-                               echo corrupt file $file - non-zero size but no extents
-                       elif [ $num_holes -ne 0 ]; then
-                               echo corrupt file $file - contains holes
-                       else
-                               rm -f $file
-                       fi
-               else
-                       rm -f $file
-               fi
-       fi
-       let i=$i+1
-done
-
-status=0
-exit 
diff --git a/tests/xfs/138.out b/tests/xfs/138.out
deleted file mode 100644 (file)
index f3eb411..0000000
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 138
diff --git a/tests/xfs/139 b/tests/xfs/139
deleted file mode 100755 (executable)
index de91a29..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-#! /bin/bash
-# FSQA Test No. 139
-#
-# Test for NULL files problem
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2006 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`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "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 IRIX
-
-_require_scratch
-_require_scratch_shutdown
-_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
-_scratch_mount
-
-# create files
-i=1;
-while [ $i -lt 1000 ]
-do
-       file=$SCRATCH_MNT/$i
-       xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file > /dev/null
-       if [ $? -ne 0 ]
-       then
-               echo error creating/writing file $file
-               exit
-       fi
-       xfs_io -c "truncate 32k" $file > /dev/null
-       if [ $? -ne 0 ]
-       then
-               echo error truncating file $file
-               exit
-       fi
-       let i=$i+1
-done
-
-# give the system a chance to write something out
-sleep 10
-
-src/godown $SCRATCH_MNT
-
-umount $SCRATCH_MNT
-_scratch_mount
-umount $SCRATCH_MNT
-if [ ! _check_scratch_fs ]
-then
-       echo error detected in filesystem
-       exit
-fi
-_scratch_mount
-
-# check file size and contents
-i=1;
-while [ $i -lt 1000 ]
-do
-       file=$SCRATCH_MNT/$i
-       # if file does not exist, the create was not logged, skip it
-       if [ -e $file ]
-       then
-               # if file size is zero it cannot be corrupt, skip it
-               if [ -s $file ]
-               then
-                       # if file has non-zero size but no extents then it's contents will be NULLs, bad.
-                       num_extents=`_count_extents $file`
-                       num_holes=`_count_holes $file`
-                       if [ $num_extents -eq 0 ]; then
-                               echo corrupt file $file - non-zero size but no extents
-                       elif [ $num_holes -ne 0 ]; then
-                               echo corrupt file $file - contains holes
-                       else
-                               rm -f $file
-                       fi
-               else
-                       rm -f $file
-               fi
-       fi
-       let i=$i+1
-done
-
-status=0
-exit 
diff --git a/tests/xfs/139.out b/tests/xfs/139.out
deleted file mode 100644 (file)
index be0ebc2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 139
diff --git a/tests/xfs/140 b/tests/xfs/140
deleted file mode 100755 (executable)
index 4882abd..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-#! /bin/bash
-# FSQA Test No. 140
-#
-# Test for NULL files problem
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2006 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`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "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 IRIX
-
-_require_scratch
-_require_scratch_shutdown
-_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
-_scratch_mount
-
-# create files
-i=1;
-while [ $i -lt 1000 ]
-do
-       file=$SCRATCH_MNT/$i
-       xfs_io -f -c "pwrite -b 32k -S 0xff 0 32k" $file > /dev/null
-       if [ $? -ne 0 ]
-       then
-               echo error creating/writing file $file
-               exit
-       fi
-       xfs_io -c "truncate 64k" $file > /dev/null
-       if [ $? -ne 0 ]
-       then
-               echo error truncating file $file
-               exit
-       fi
-       let i=$i+1
-done
-
-# give the system a chance to write something out
-sleep 10
-
-src/godown $SCRATCH_MNT
-
-umount $SCRATCH_MNT
-_scratch_mount
-umount $SCRATCH_MNT
-if [ ! _check_scratch_fs ]
-then
-       echo error detected in filesystem
-       exit
-fi
-_scratch_mount
-
-# check file size and contents
-i=1;
-while [ $i -lt 1000 ]
-do
-       file=$SCRATCH_MNT/$i
-       # if file does not exist, the create was not logged, skip it
-       if [ -e $file ]
-       then
-               # if file size is zero it cannot be corrupt, skip it
-               if [ -s $file ]
-               then
-                       # if file has non-zero size but no extents then it's contents will be NULLs, bad.
-                       num_extents=`_count_extents $file`
-                       if [ $num_extents -eq 0 ]; then
-                               echo corrupt file $file - non-zero size but no extents
-                       else
-                               rm -f $file
-                       fi
-               else
-                       rm -f $file
-               fi
-       fi
-       let i=$i+1
-done
-
-status=0
-exit 
diff --git a/tests/xfs/140.out b/tests/xfs/140.out
deleted file mode 100644 (file)
index e6506b8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 140
diff --git a/tests/xfs/179 b/tests/xfs/179
deleted file mode 100755 (executable)
index 2f3673e..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-#! /bin/bash
-# FSQA Test No. 179
-#
-# Test for NULL files problem
-# test inode size is on disk after fsync
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2006 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`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "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 IRIX
-
-_require_scratch
-_require_scratch_shutdown
-_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
-_scratch_mount
-
-_check_files()
-{
-       # check file size and contents
-       i=1;
-       while [ $i -lt 1000 ]
-       do
-               file=$SCRATCH_MNT/$i
-               # if file is missing then fsync failed
-               if [ -e $file ]
-               then
-                       # if file size is not 32KB then fsync failed
-                       if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 32768 ]
-                       then
-                               # if file has non-zero size but no extents then it's contents will be NULLs, bad.
-                               num_extents=`_count_extents $file`
-                               if [ $num_extents -eq 0 ]; then
-                                       echo corrupt file $file - non-zero size but no extents
-                               else
-                                       rm -f $file
-                               fi
-                       else
-                               echo file $file has incorrect size - fsync failed
-                       fi
-               else
-                       echo file $file missing - fsync failed
-               fi
-               let i=$i+1
-       done
-}
-
-# create files and fsync them
-i=1;
-while [ $i -lt 1000 ]
-do
-       file=$SCRATCH_MNT/$i
-       xfs_io -f -c "pwrite -b 32k -S 0xff 0 32k" -c "fsync" $file > /dev/null
-       if [ $? -ne 0 ]
-       then
-               echo error creating/writing file $file
-               exit
-       fi
-       let i=$i+1
-done
-
-# shutdown immediately after, then remount and test
-src/godown $SCRATCH_MNT
-umount $SCRATCH_MNT
-_scratch_mount
-umount $SCRATCH_MNT
-if [ ! _check_scratch_fs ]
-then
-       echo error detected in filesystem
-       exit
-fi
-_scratch_mount
-_check_files
-
-status=0
-exit
diff --git a/tests/xfs/179.out b/tests/xfs/179.out
deleted file mode 100644 (file)
index e5b0ba9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 179
diff --git a/tests/xfs/180 b/tests/xfs/180
deleted file mode 100755 (executable)
index 40a186a..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-#! /bin/bash
-# FSQA Test No. 180
-#
-# Test for NULL files problem
-# test inode size is on disk after sync
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2006 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`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "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 IRIX
-
-_require_scratch
-_require_scratch_shutdown
-_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
-_scratch_mount
-
-# Do we have enough space on disk?  10G
-_require_fs_space $SCRATCH_MNT 10485760
-
-_check_files()
-{
-       # check file size and contents
-       i=1;
-       while [ $i -lt 1000 ]
-       do
-               file=$SCRATCH_MNT/$i
-               # if file is missing then sync failed
-               if [ -e $file ]
-               then
-                       # if file size is not 10MB then sync failed
-                       if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 10485760 ]
-                       then
-                               # if file has non-zero size but no extents then it's contents will be NULLs, bad.
-                               num_extents=`_count_extents $file`
-                               if [ $num_extents -eq 0 ]; then
-                                       echo corrupt file $file - non-zero size but no extents
-                               else
-                                       rm -f $file
-                               fi
-                       else
-                               echo file $file has incorrect size - sync failed
-                       fi
-               else
-                       echo file $file missing - sync failed
-               fi
-               let i=$i+1
-       done
-}
-
-# create files and sync them
-i=1;
-while [ $i -lt 1000 ]
-do
-       file=$SCRATCH_MNT/$i
-       xfs_io -f -c "pwrite -b 64k -S 0xff 0 10m" $file > /dev/null
-       if [ $? -ne 0 ]
-       then
-               echo error creating/writing file $file
-               exit
-       fi
-       let i=$i+1
-done
-
-# sync, then shutdown immediately after, then remount and test
-sync
-src/godown $SCRATCH_MNT
-umount $SCRATCH_MNT
-_scratch_mount
-umount $SCRATCH_MNT
-if [ ! _check_scratch_fs ]
-then
-       echo error detected in filesystem
-       exit
-fi
-_scratch_mount
-_check_files
-
-status=0
-exit
diff --git a/tests/xfs/180.out b/tests/xfs/180.out
deleted file mode 100644 (file)
index 9035544..0000000
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 180
diff --git a/tests/xfs/182 b/tests/xfs/182
deleted file mode 100755 (executable)
index 028e121..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-#! /bin/bash
-# FSQA Test No. 182
-#
-# Test for NULL files problem
-# test inode size is on disk after sync - expose log replay bug
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2006 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`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "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 IRIX
-
-_require_scratch
-_require_scratch_shutdown
-_require_fiemap
-_scratch_mkfs_xfs >/dev/null 2>&1
-_scratch_mount
-
-_check_files()
-{
-       # check file size and contents
-       i=1;
-       while [ $i -lt 1000 ]
-       do
-               file=$SCRATCH_MNT/$i
-               # if file is missing then sync failed
-               if [ -e $file ]
-               then
-                       # if file size is not 32KB then sync failed
-                       if [ `ls -l $file | tr -s ' ' | cut -d ' ' -f 5` -eq 32768 ]
-                       then
-                               # if file has non-zero size but no extents then it's contents will be NULLs, bad.
-                               num_extents=`_count_extents $file`
-                               if [ $num_extents -eq 0 ]; then
-                                       echo corrupt file $file - non-zero size but no extents
-                               else
-                                       rm -f $file
-                               fi
-                       else
-                               echo file $file has incorrect size - sync failed
-                       fi
-               else
-                       echo file $file missing - sync failed
-               fi
-               let i=$i+1
-       done
-}
-
-# create files and sync them
-i=1;
-while [ $i -lt 1000 ]
-do
-       file=$SCRATCH_MNT/$i
-       xfs_io -f -c "pwrite -b 32k -S 0xff 0 32k" $file > /dev/null
-       if [ $? -ne 0 ]
-       then
-               echo error creating/writing file $file
-               exit
-       fi
-       let i=$i+1
-done
-
-# sync, then shutdown immediately after, then remount and test
-sync
-src/godown $SCRATCH_MNT
-umount $SCRATCH_MNT
-_scratch_mount
-umount $SCRATCH_MNT
-if [ ! _check_scratch_fs ]
-then
-       echo error detected in filesystem
-       exit
-fi
-_scratch_mount
-_check_files
-
-status=0
-exit
diff --git a/tests/xfs/182.out b/tests/xfs/182.out
deleted file mode 100644 (file)
index 5e665c8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-QA output created by 182
diff --git a/tests/xfs/200 b/tests/xfs/200
deleted file mode 100755 (executable)
index bd6d0fd..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 200
-#
-# Check out various mount/remount/unmount scenarious on a read-only blockdev.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2009 Christoph Hellwig.
-#
-# 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`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1       # failure is the default!
-
-_cleanup()
-{
-       cd /
-       blockdev --setrw $SCRATCH_DEV
-}
-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
-
-_require_scratch_nocheck
-_require_scratch_shutdown
-_require_norecovery
-
-_scratch_mkfs_xfs >/dev/null 2>&1
-
-#
-# Mark the device read-only
-#
-echo "setting device read-only"
-blockdev --setro $SCRATCH_DEV
-
-#
-# Mount it, and make sure we can't write to it, and we can unmount it again
-#
-echo "mounting read-only block device:"
-_scratch_mount 2>&1 | _filter_scratch | _filter_ro_mount
-
-echo "touching file on read-only filesystem (should fail)"
-touch $SCRATCH_MNT/foo 2>&1 | _filter_scratch
-
-#
-# Apparently this used to be broken at some point:
-#      http://oss.sgi.com/bugzilla/show_bug.cgi?id=807
-#
-echo "unmounting read-only filesystem"
-umount $SCRATCH_MNT 2>&1 | _filter_scratch
-
-echo "setting device read-write"
-blockdev --setrw $SCRATCH_DEV
-
-echo "mounting read-write block device:"
-_scratch_mount 2>&1 | _filter_scratch
-
-echo "touch files"
-touch $SCRATCH_MNT/{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}
-
-echo "going down:"
-src/godown -f $SCRATCH_MNT
-
-echo "unmounting shutdown filesystem:"
-umount $SCRATCH_MNT 2>&1 | _filter_scratch
-
-echo "setting device read-only"
-blockdev --setro $SCRATCH_DEV
-
-#
-# Mounting a filesystem that requires log-recovery fails unless
-# -o norecovery is used.
-#
-echo "mounting filesystem that needs recovery on a read-only device:"
-_scratch_mount 2>&1 | _filter_scratch | _filter_ro_mount
-
-echo "unmounting read-only filesystem"
-umount $SCRATCH_MNT 2>&1 | _filter_scratch
-
-#
-# This is the way out if the underlying device really is read-only.
-# Doesn't mean it's a good idea in practive, more a last resort
-# data recovery hack.
-#
-echo "mounting filesystem with -o norecovery on a read-only device:"
-_scratch_mount -o norecovery 2>&1 | _filter_scratch | _filter_ro_mount
-
-echo "unmounting read-only filesystem"
-umount $SCRATCH_MNT 2>&1 | _filter_scratch
-
-echo "setting device read-write"
-blockdev --setrw $SCRATCH_DEV
-
-#
-# But log recovery is performed when mount with -o ro as long as
-# the underlying device is not write protected.
-#
-echo "mounting filesystem that needs recovery with -o ro:"
-_scratch_mount -o ro 2>&1 | _filter_scratch 
-
-# success, all done
-echo "*** done"
-rm -f $seqres.full
-status=0
diff --git a/tests/xfs/200.out b/tests/xfs/200.out
deleted file mode 100644 (file)
index 40f9163..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-QA output created by 200
-setting device read-only
-mounting read-only block device:
-mount: SCRATCH_DEV is write-protected, mounting read-only
-touching file on read-only filesystem (should fail)
-touch: cannot touch 'SCRATCH_MNT/foo': Read-only file system
-unmounting read-only filesystem
-setting device read-write
-mounting read-write block device:
-touch files
-going down:
-unmounting shutdown filesystem:
-setting device read-only
-mounting filesystem that needs recovery on a read-only device:
-mount: SCRATCH_DEV is write-protected, mounting read-only
-mount: cannot mount SCRATCH_DEV read-only
-unmounting read-only filesystem
-umount: SCRATCH_MNT: not mounted
-mounting filesystem with -o norecovery on a read-only device:
-mount: SCRATCH_DEV is write-protected, mounting read-only
-unmounting read-only filesystem
-setting device read-write
-mounting filesystem that needs recovery with -o ro:
-*** done
diff --git a/tests/xfs/306 b/tests/xfs/306
deleted file mode 100755 (executable)
index 5af5ace..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/bash
-# FS QA Test No. xfs/306
-#
-# Basic log recovery stress test - do lots of stuff, shut down in the middle of
-# it and check that recovery runs to completion and everything can be
-# successfully removed afterwards..
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2013 Red Hat, 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`
-seqres=$RESULT_DIR/$seq
-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
-
-_cleanup()
-{
-       cd /
-       umount $SCRATCH_MNT 2>/dev/null
-       rm -f $tmp.*
-}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# real QA test starts here
-_supported_fs xfs
-_supported_os Linux
-
-_require_scratch
-_require_scratch_shutdown
-
-rm -f $seqres.full
-
-_scratch_mkfs > $seqres.full 2>&1
-_scratch_mount
-
-SLEEP_TIME=$((30 * $TIME_FACTOR))
-PROCS=$((2 * LOAD_FACTOR))
-
-load_dir=$SCRATCH_MNT/test
-
-# let this run for a while
-$FSSTRESS_PROG -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
-sleep $SLEEP_TIME
-killall -q $FSSTRESS_PROG
-wait
-sync
-umount $SCRATCH_MNT
-
-# now mount again, run the load again, this time with a shutdown.
-_scratch_mount
-$XFS_FSR_PROG -v $load_dir >> $seqres.full 2>&1
-$FSSTRESS_PROG -n10000000 -p $PROCS -d $load_dir >> $seqres.full 2>&1 &
-sleep $SLEEP_TIME
-sync
-
-# now shutdown and unmount
-sleep 5
-$here/src/godown $load_dir
-killall -q $FSSTRESS_PROG
-wait
-
-# for some reason fsstress processes manage to live on beyond the wait?
-sleep 5
-umount $SCRATCH_MNT
-
-# now recover, check the filesystem for consistency
-_scratch_mount
-umount $SCRATCH_MNT
-_check_scratch_fs
-
-# now clean up.
-_scratch_mount
-for d in $load_dir/*; do
-        rm -rf $d > /dev/null 2>&1 &
-done
-wait
-umount $SCRATCH_MNT
-
-echo "No output is good. Failures are loud."
-
-status=0
-exit
diff --git a/tests/xfs/306.out b/tests/xfs/306.out
deleted file mode 100644 (file)
index 9fd18a4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-QA output created by 306
-No output is good. Failures are loud.
index 9ffd17bfc885b7354c629340b08623968146f834..de34822c66f667a77187644f1f30c4333b16ef4b 100644 (file)
@@ -50,7 +50,6 @@
 050 quota auto quick
 051 auto log metadata
 052 quota db auto quick
-053 auto quick rw
 054 quota auto quick
 055 dump ioctl remote tape
 056 dump ioctl auto quick
 122 other auto quick
 134 quota auto quick
 136 attr2
-137 metadata log auto
-138 metadata log auto
-139 metadata log auto
-140 metadata log auto
 142 dmapi
 143 dmapi
 144 dmapi
 176 dmapi
 177 dmapi
 178 mkfs other auto
-179 metadata rw auto
-180 metadata rw auto
 181 log auto quick
-182 metadata rw auto
 183 rw other auto quick
 185 dmapi
 186 attr auto quick
 196 quota auto quick
 197 dir auto quick
 199 mount auto quick
-200 mount auto quick
 201 metadata auto quick
 202 repair auto quick
 203 ioctl auto
 303 auto quick quota
 304 auto quick quota
 305 auto quota
-306 auto stress log metadata repair