#
# Test btrfs's subvolume and snapshot support
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick subvol snapshot
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
#
# Extented btrfs snapshot test cases
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto snapshot
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs btrfs
#
# btrfs vol tests
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto replace volume balance
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
dev_removed=0
removed_dev_htl=""
-trap "_cleanup; exit \$status" 0 1 2 3 15
# Check if all scratch dev pools are deletable
deletable_scratch_dev_pool()
return 0
}
+# Override the default cleanup function.
_cleanup()
{
cd /
fi
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs btrfs
_require_scratch_dev_pool 4
_require_command "$WIPEFS_PROG" wipefs
-rm -f $seqres.full
-
# Test cases related to raid in btrfs
_test_raid0()
{
# run filefrag to get the extent mapping and follow the backrefs.
# We check to end up back at the original file with the correct offset.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw metadata
-here=`pwd`
-tmp=/tmp/$$
-status=1
noise_pid=0
+# Override the default cleanup function.
_cleanup()
{
rm $tmp.running
wait
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_btrfs_command inspect-internal inode-resolve
_require_command "$FILEFRAG_PROG" filefrag
-rm -f $seqres.full
-
FILEFRAG_FILTER='
if (/blocks? of (\d+) bytes/) {
$blocksize = $1;
#
# Btrfs Online defragmentation tests
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-here="`pwd`"
-tmp=/tmp/$$
+. ./common/preamble
+_begin_fstest auto defrag
cnt=119
filesize=48000
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
_create_file()
{
if [ $1 -ne 2 ]; then
_check_scratch_fs
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/defrag
_supported_fs btrfs
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
_require_defrag
# run basic btrfs information commands in various ways
# sanity tests: filesystem show, label, sync, and device stats
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick volume
-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
+# Import common functions.
. ./common/filter.btrfs
# real QA test starts here
_require_scratch
_require_scratch_dev_pool
-rm -f $seqres.full
-
FIRST_POOL_DEV=`echo $SCRATCH_DEV_POOL | awk '{print $1}'`
LAST_POOL_DEV=`echo $SCRATCH_DEV_POOL | awk '{print $NF}'`
TOTAL_DEVS=`echo $SCRATCH_DEV_POOL | wc -w`
# creator
owner=list.btrfs@jan-o-sch.net
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1
+. ./common/preamble
+_begin_fstest auto quick rw metadata send seek
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
rm -fr $send_files_dir
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
#
# btrfs send ENOENT regression test, from a user report on linux-btrfs
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send
-here=`pwd`
-tmp=/tmp/$$
tmp_dir=send_temp_$seq
-status=1 # failure is the default!
-
+# Override the default cleanup function.
_cleanup()
{
$BTRFS_UTIL_PROG subvolume delete $TEST_DIR/$tmp_dir/send/snapshots/backup2 > /dev/null 2>&1
rm -f $tmp.*
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Regression test to make sure we can't delete the default subvol
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick subvol
-here=`pwd`
-tmp=/tmp/$$
-
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs btrfs
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
# Regression test for patch "Btrfs: fix delalloc accounting leak caused
# by u32 overflow".
#
-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
+. ./common/preamble
+_begin_fstest auto
test_file="$TEST_DIR/$seq"
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* "$test_file"
}
-. ./common/rc
. ./common/filter
-rm -f $seqres.full
-
_supported_fs btrfs
_require_test
_require_btrfs_fs_sysfs
# To check the filesystems after replacing a device, a scrub run is
# performed, a btrfsck run, and finally the filesystem is remounted.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto replace volume
-here=`pwd`
-tmp=/tmp/$$
-status=1
noise_pid=0
+# Override the default cleanup function.
_cleanup()
{
if [ $noise_pid -ne 0 ] && ps -p $noise_pid | grep -q $noise_pid; then
# needed by _require_scratch, and make it umounted.
_scratch_unmount > /dev/null 2>&1
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_size $((10 * 1024 * 1024)) #kB
_require_command "$WIPEFS_PROG" wipefs
-rm -f $seqres.full
rm -f $tmp.*
echo "*** test btrfs replace"
# 5) roll back conversion to original ext4
# 6) verify rolled-back fs integrity & contents
#
-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/preamble
+_begin_fstest auto convert
+
+# Import common functions.
. ./common/filter.btrfs
# real QA test starts here
_require_fs_space $SCRATCH_MNT $(du -s /lib/modules/`uname -r` | ${AWK_PROG} '{print $1}')
-rm -f $seqres.full
-
BLOCK_SIZE=`_get_block_size $TEST_DIR`
# Create & populate an ext4 filesystem
# userspace doesn't get an error when reading the file back so we have to grok
# dmesg to see if there was a csum error.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick balance
-here=`pwd`
-tmp=/tmp/$$
-
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
#
# Btrfs balance tests
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here="`pwd`"
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto balance
_create_snapshot()
{
}
#get standard environment, filters and checks
-. ./common/rc
. ./common/filter
# real QA test starts here
# Regression test to make sure we can create a snapshot after mounting with
# readonly and remounting rw.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick snapshot
-here=`pwd`
-tmp=/tmp/$$
-
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs btrfs
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs > /dev/null 2>&1
_scratch_mount -o ro
_scratch_mount -o rw,remount
#
# btrfs send hole punch test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send
tmp=`mktemp -d`
tmp_dir=send_temp_$seq
-status=1 # failure is the default!
-
+# Override the default cleanup function.
_cleanup()
{
$BTRFS_UTIL_PROG subvolume delete $TEST_DIR/$tmp_dir/snap > /dev/null 2>&1
rm -f $tmp.*
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# The issue is fixed by https://patchwork.kernel.org/patch/5499981/
# "Btrfs: fix a warning of qgroup account on shared extents"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick qgroup
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_cloner
-rm -f $seqres.full
-
# Currently in btrfs the node/leaf size can not be smaller than the page
# size (but it can be greater than the page size). So use the largest
# supported node/leaf size (64Kb) so that the test can run on any platform
#
# Regression test to make sure we can move a subvol into another subvol
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick subvol
-here=`pwd`
-tmp=/tmp/$$
-
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs btrfs
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
$BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/test1 >> $seqres.full 2>&1 \
#
# btrfs send ENOENT regression test, kernel bugzilla 60673
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send
-here=`pwd`
-tmp=/tmp/$$
tmp_dir=send_temp_$seq
-status=1 # failure is the default!
-
+# Override the default cleanup function.
_cleanup()
{
$BTRFS_UTIL_PROG subvolume delete $TEST_DIR/$tmp_dir/snap1 > /dev/null 2>&1
rm -f $tmp.*
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# Regression test for commit:
# bbb651e Btrfs: don't allow the replace procedure on read only filesystems
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick replace volume
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $fs_img1 $fs_img2 $fs_img3
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_test
_require_loop
-rm -f $seqres.full
echo "Silence is golden"
loop_mnt=$TEST_DIR/$seq.$$.mnt
# The test aims to trigger snapshot-aware defrag path in endio by
# running balance, which is not expected and leads to a crash.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick balance defrag
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs btrfs
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
#
# Test the basic functionality of qgroups
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto qgroup limit
-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
+# Import common functions.
. ./common/filter
_supported_fs btrfs
_require_scratch
_require_btrfs_qgroup_report
-rm -f $seqres.full
-
# Test to make sure we can actually turn it on and it makes sense
_basic_test()
{
#
# The test aims to create the raid and verify that its created
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs btrfs
_require_scratch_dev_pool 4
-rm -f $seqres.full
create_group_profile()
{
# the oops will happen when the users write some data into the files whose
# compress flag is set but the compression of the fs is disabled.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick compress
-here=`pwd`
-tmp=/tmp/$$
-
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# to the ioctl clone API, which would return -EINVAL errors to btrfs receive,
# causing the receive command to abort immediately.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send clone
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
# Test that doing a direct IO write against a file range that contains one
# prealloc extent and one compressed extent works correctly.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick compress prealloc
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount "-o compress"
#
# Test replace of a missing device on various data and metadata profiles.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto replace volume
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
# Although current qgroup can handle it, we still need to prevent any
# regression which may break current qgroup.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto qgroup balance
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch
# - Copy a file with the reflink=always option. Should result in
# error.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
rm -rf $reflink_test_dir
mkdir $reflink_test_dir
-rm -f $seqres.full
-
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
$XFS_IO_PROG -f -c 'pwrite -S 0x61 0 9000' $SCRATCH_MNT/original >> $seqres.full
# used while building path strings until a krealloc was unable to allocate
# more memory, which caused a warning dump in dmesg.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_fssum
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
-
mkdir -p $SCRATCH_MNT/a/b/c
echo "hello" > $SCRATCH_MNT/a/b/c/file.txt
mkdir $SCRATCH_MNT/a/b/c/d
# - Change one original and two reflinked files
# - Move reflinked files between subvolumes
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick subvol clone
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
subvol2=$SCRATCH_MNT/subvol-$seq-2
cross_mount_test_dir=$TEST_DIR/test-$seq
-rm -f $seqres.full
-
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
# Regression test for transaction abortion when remounting RW to RO
# with flushoncommit option enabled.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick remount
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Regression test for iterating backrefs
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send snapshot
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch
# Test for a btrfs incremental send data corruption issue due to
# bad detection of file holes.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
#
# Regression test for overwriting clones
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
#
# Regression test for running snapshots and send concurrently.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send snapshot
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
snapshots_pid=0
+# Override the default cleanup function.
_cleanup()
{
# kill backgroud snapshots
done
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch
#
# Btrfs: fix data corruption when reading/updating compressed extents
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick compress
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount "-o compress-force=lzo"
#
# Btrfs: use right clone root offset for compressed extents
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick compress send
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_fssum
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount "-o compress-force=lzo"
#
# Btrfs: incremental send, fix invalid path after dir rename
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_fssum
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
#
# Btrfs: send, don't send rmdir for same target multiple times
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_fssum
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
#
# Btrfs-progs: fix restore of files with compressed extents
#
-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
+. ./common/preamble
+_begin_fstest auto quick compress
restore_dir=$TEST_DIR/btrfs-test-$seq
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
rm -fr $restore_dir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_test
_require_scratch
-rm -f $seqres.full
mkdir $restore_dir
test_btrfs_restore()
#
# Test the basic functionality of Quota groups
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick qgroup limit
-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
+# Import common functions.
. ./common/filter
_supported_fs btrfs
_require_scratch
_require_btrfs_qgroup_report
-rm -f $seqres.full
-
run_check _scratch_mkfs
_scratch_mount
#
# Btrfs: fix send attempting to rmdir non-empty directories
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_fssum
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
#
# Btrfs: fix send issuing outdated paths for utimes, chown and chmod
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_fssum
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
# Btrfs: send, fix more issues related to directory renames
# Btrfs: send, account for orphan directories when building path strings
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_fssum
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
#
# Btrfs: send, fix data corruption due to incorrect hole detection
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
send_files_dir=$TEST_DIR/btrfs-test-$seq
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_xfs_io_command "falloc"
_require_fssum
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Test that we can't set xattrs on subvolume placeholder directories.
# Regression test for Btrfs: disable xattr operations on subvolume directories.
#
-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/preamble
+_begin_fstest auto quick snapshot attr
+
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
# btrfs: fix vanished compression property after failed set
# btrfs: fix zstd compression parameter
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
#
# Btrfs: fix inode caching vs tree log
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -rf $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
SAVE_MOUNT_OPTIONS="$MOUNT_OPTIONS"
#
# Btrfs: send, fix incorrect ref access when using extrefs
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
#
# Btrfs: send, fix corrupted path strings for long paths
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# file as a source and target. That is, clone extents within the same
# file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_cloner
-rm -f $seqres.full
-
test_btrfs_clone_same_file()
{
if [ -z $1 ]; then
#
# Btrfs: send, use the right limits for xattr names and values
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Btrfs: send, don't error in the presence of subvols/snapshots
# Btrfs: set dead flag on the right root when destroying snapshot
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
#
# Btrfs: fix clone to deal with holes when NO_HOLES feature is enabled
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_btrfs_fs_feature "no_holes"
_require_btrfs_mkfs_feature "no-holes"
-rm -f $seqres.full
-
test_btrfs_clone_with_holes()
{
_scratch_mkfs "$1" >/dev/null 2>&1
#
# Btrfs: make fsync work after cloning into a file
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick clone log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_btrfs_mkfs_feature "no-holes"
_require_dm_target flakey
-rm -f $seqres.full
-
test_btrfs_clone_fsync_log_recover()
{
_scratch_mkfs "$1" >/dev/null 2>&1
#
# Quota rescan stress test, we run fsstress and quota rescan concurrently
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs btrfs
_require_scratch
-rm -f $seqres.full
-
run_check _scratch_mkfs "-b 1g"
_scratch_mount
#
# Btrfs: update commit root on snapshot creation after orphan cleanup
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send snapshot
+# Override the default cleanup function.
_cleanup()
{
if [ ! -z $XFS_IO_PID ]; then
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "-T"
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
#
# Btrfs: add missing compression property remove in btrfs_ioctl_setflags
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
_require_scratch
_require_btrfs_command "property"
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
# Run btrfs balance and subvolume create/mount/umount/delete simultaneously,
# with fsstress running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto balance subvol
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool 4
_btrfs_get_profile_configs
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Run btrfs balance and scrub operations simultaneously with fsstress
# running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto balance scrub
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool 4
_btrfs_get_profile_configs
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Run btrfs balance and defrag operations simultaneously with fsstress
# running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto balance defrag compress
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool 4
_btrfs_get_profile_configs
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Run btrfs balance and remount with different compress algorithms
# simultaneously, with fsstress running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto balance remount compress
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool 4
_btrfs_get_profile_configs
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Balance and replace operations are mutually exclusive operations they can't
# run simultaneously. One of them is expected to fail when the other is running.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto balance replace volume
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool_equal_size
_btrfs_get_profile_configs replace
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Run btrfs subvolume create/mount/umount/delete and device replace
# operation simultaneously, with fsstress running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto subvol replace volume
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool_equal_size
_btrfs_get_profile_configs replace
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Run btrfs subvolume create/mount/umount/delete and btrfs scrub
# operation simultaneously, with fsstress running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto subvol scrub
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool 4
_btrfs_get_profile_configs
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Run btrfs subvolume create/mount/umount/delete and btrfs defrag
# operation simultaneously, with fsstress running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto subvol defrag compress
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool 4
_btrfs_get_profile_configs
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# different compress algorithms simultaneously, with fsstress running
# in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto subvol remount compress
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool 4
_btrfs_get_profile_configs
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Run btrfs replace operations and scrub simultaneously with fsstress
# running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto replace scrub volume
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool_equal_size
_btrfs_get_profile_configs replace
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Run btrfs replace operations and defrag simultaneously with fsstress
# running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto replace defrag compress volume
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool_equal_size
_btrfs_get_profile_configs replace
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Run btrfs replace operations and remount with different compress
# algorithms simultaneously with fsstress running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto replace remount compress volume
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool_equal_size
_btrfs_get_profile_configs replace
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Run btrfs scrub and defrag operations simultaneously with fsstress
# running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto scrub defrag compress
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool 4
_btrfs_get_profile_configs
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Run btrfs scrub and remount with different compress algorithms
# simultaneously with fsstress running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto scrub remount compress
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool 4
_btrfs_get_profile_configs
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# Run btrfs defrag operations and remount with different compress algorithms
# simultaneously with fsstress running in background.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto defrag remount compress
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool 4
_btrfs_get_profile_configs
-rm -f $seqres.full
-
run_test()
{
local mkfs_opts=$1
# If one subvolume was mounted with selinux context, other subvolumes
# should be able to be mounted with the same selinux context too.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick subvol
+# Override the default cleanup function.
_cleanup()
{
cd /
$UMOUNT_PROG $subvol_mnt >/dev/null 2>&1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_notrun "Require selinux to be enabled"
fi
-rm -f $seqres.full
echo "Silence is golden"
# first mount default subvolume with selinux context set
#
# Btrfs: fix incorrect compression ratio detection
#
-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
+. ./common/preamble
+_begin_fstest auto quick compress
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/defrag
_require_test
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount "-o compress=lzo"
#
# Btrfs: send, don't delay dir move if there's a new parent inode
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send snapshot
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Btrfs: race free update of commit root for ro snapshots
# 9c3b306e1c9e6be4be09e99a8fe2227d1005effc
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto snapshot
tmp=`mktemp -d`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs btrfs
_require_scratch
-rm -f $seqres.full
-
workout()
{
ops=$1
# btrfs: Fix and enhance merge_extent_mapping() to insert best fitted extent map
# btrfs: Fix the wrong condition judgment about subset extent map
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto rw metadata
+# Override the default cleanup function.
_cleanup()
{
kill $dd_pid &> /dev/null
rm -fr $tmp.* $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
count=$(($filesize / $buffersize))
testfile=$SCRATCH_MNT/testfile
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
_require_fs_space $SCRATCH_MNT $(($filesize / 1024))
#
# Btrfs: fix snapshot inconsistency after a file write followed by truncate
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto snapshot
+# Override the default cleanup function.
_cleanup()
{
for p in ${cpu_stress_pids[*]}; do
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs btrfs
_require_scratch_nocheck
-rm -f $seqres.full
-
create_snapshot()
{
local ts=`date +'%H_%M_%S_%N'`
# Btrfs: ensure readers see new data after a clone operation
# (commit c125b8bff1d9f6c8c91ce4eb8bd5616058c7d510)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick clone
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_cloner
-rm -f $seqres.full
-
num_extents=100
extent_size=8192
# btrfs: fix crash in remount(thread_pool=) case
# 800ee2247f483b6d05ed47ef3bbc90b56451746c
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick remount
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Btrfs: incremental send, don't rename a directory too soon
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
#
# Btrfs: incremental send, clear name from cache after orphanization
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# (i.e. btrfs subvol set-default)
# 3) Non-default subvolume lookup
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick metadata subvol
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_dm_target flakey
_require_btrfs_command inspect-internal dump-tree
-rm -f $seqres.full
-
has_orphan_item()
{
INO=$1
#
# Btrfs: fix inode eviction infinite loop after cloning into it
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_cloner
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
#
# Btrfs: incremental send, don't delay directory renames unnecessarily
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Btrfs: fix fs corruption on transaction abort if device supports discard
# (commit 678886bdc6378c1cbd5072da2c5a3035000214e3)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick metadata
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
echo 0 > $DEBUGFS_MNT/fail_make_request/times
}
-rm -f $seqres.full
-
# We will abort a btrfs transaction later, which always produces a warning in
# dmesg. We do not want the test to fail because of this.
_disable_dmesg_check
# not unmounted prematurely. This is a regression test for Linux commit "Btrfs:
# don't invalidate root dentry when subvolume deletion fails".
#
-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/preamble
+_begin_fstest auto quick subvol
+
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
_supported_fs btrfs
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# btrfs-progs: Fix wrong return value when executing 'fi show' on
# umounted device.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick metadata
-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
+# Import common functions.
. ./common/filter.btrfs
# real QA test starts here
_require_scratch
_require_scratch_dev_pool
-rm -f $seqres.full
-
FIRST_POOL_DEV=`echo $SCRATCH_DEV_POOL | awk '{print $1}'`
TOTAL_DEVS=`echo $SCRATCH_DEV_POOL | wc -w`
# Test for incorrect exclusive reference count after cloning file
# between subvolumes.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick qgroup
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch
_require_cp_reflink
-rm -f $seqres.full
-
# use largest node/leaf size (64K) to allow the test to be run on arch with
# page size > 4k.
NODESIZE=65536
#
# Btrfs: incremental send, check if orphanized dir inode needs delayed rename
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
#
# Btrfs: fix range cloning when same inode used as source and destination
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_cloner
-rm -f $seqres.full
-
# Create a file with an extent layout that confused the btrfs clone ioctl
# implementation. The first extent item that is cloned by the second call
# to the cloner program will have only a trailing part of it referenced by
#
# Btrfs: incremental send, fix clone operations for compressed extents
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
$XFS_IO_PROG -c "pwrite -S 0xbb $((16 * $BLOCK_SIZE)) $((28 * $BLOCK_SIZE))" \
-c "fsync" $SCRATCH_MNT/foo | _filter_xfs_io_blocks_modified
-
# Now rewrite the block range [45, 48[. This will make the inode's
# metadata continue to point the 32 block extent we created earlier,
# with a single extent item that points to it with a start offset
#
# The regression was introduced in the 4.2-rc1 Linux kernel.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_cloner
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# The 25 blocks extent has a single back reference and it relates to file offset
# mapped by 768th block.
-
# Now clone our 25 block extent into offset mapped by 150th block. That offset
# covers the last 5 blocks of the prealloc extent, the whole 10 block extent and
# 10 blocks of the hole starting at offset mapped by 165th block.
#
# Test that we can not clone an inline extent into a non-zero file offset.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick clone
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
_require_scratch
_require_cloner
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# Test that an incremental send works after a file gets one of its extents
# cloned/deduplicated into lower file offsets.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send clone
+# Override the default cleanup function.
_cleanup()
{
rm -fr $send_files_dir
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# lower file offset, after a power failure our file has the same content it
# had before the power failure and after the extent cloning operation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata clone log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_dm_target flakey
_require_cloner
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
-c "fsync" \
$SCRATCH_MNT/foo | _filter_xfs_io_blocks_modified
-
# Now clone part of our extent into file offset mapped by 100th block. This adds
# a file extent item to our inode's metadata that points to the 25 block extent
# we created before, using a data offset of 5 blocks and a data length of 5
# Check for qgroup reserved space leaks caused by re-writing dirty ranges
# This bug has been present in btrfs qgroup for a long time
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick qgroup limit
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
BLOCKSIZE=$(( 2 * 1024 * 1024 )) # 2M block size
FILESIZE=$(( 128 * 1024 * 1024 )) # 128M file size
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
_require_fs_space $SCRATCH_MNT $(($FILESIZE * 2 / 1024))
# Test device replace works when the source device has EIO
#
#
-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
-
+. ./common/preamble
+_begin_fstest auto replace volume eio
+# Override the default cleanup function.
_cleanup()
{
_dmerror_cleanup
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
. ./common/dmerror
_require_scratch_dev_pool 3
_require_dm_target error
-rm -f $seqres.full
-
dev1="`echo $SCRATCH_DEV_POOL | $AWK_PROG '{print $2}'`"
dev2="`echo $SCRATCH_DEV_POOL | $AWK_PROG '{print $3}'`"
# Test device delete when the source device has EIO
#
#
-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
-
+. ./common/preamble
+_begin_fstest auto replace volume eio
+# Override the default cleanup function.
_cleanup()
{
_dmerror_cleanup
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
. ./common/dmerror
_require_btrfs_dev_del_by_devid
_require_dm_target error
-rm -f $seqres.full
-
dev1="`echo $SCRATCH_DEV_POOL | $AWK_PROG '{print $2}'`"
dev2="`echo $SCRATCH_DEV_POOL | $AWK_PROG '{print $3}'`"
# Regression test for an ENOSPC issue when attempting to write to a file in
# a filesystem without any data block groups allocated.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick metadata enospc balance
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs btrfs
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
# Mount our filesystem without space caches enabled so that we do not get any
# Regression test for file read corruption when using compressed extents that
# are shared by multiple consecutive ranges of the same file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick clone compress
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_cloner
-rm -f $seqres.full
-
test_clone_and_read_compressed_extent()
{
local mount_opts=$1
-c "pwrite -S 0xcc $((3 * $BLOCK_SIZE)) $((1 * $BLOCK_SIZE))" \
$SCRATCH_MNT/foo | _filter_xfs_io_blocks_modified
-
# Now clone our extent into an adjacent offset.
$CLONER_PROG -s $((1 * $BLOCK_SIZE)) -d $((4 * $BLOCK_SIZE)) \
-l $((2 * $BLOCK_SIZE)) $SCRATCH_MNT/foo $SCRATCH_MNT/foo
# Btrfs: keep dropped roots in cache until transaciton commit
# btrfs: qgroup: account shared subtree during snapshot delete
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto qgroup
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch
_require_btrfs_qgroup_report
-rm -f $seqres.full
-
# Create an fs tree of a given height at a target location. This is
# done by agressively creating inline extents to expand the number of
# nodes required. We also add an traditional extent so that
# gets replaced in the send snapshot by another one at the same exact location,
# with the same name and with the same inode number.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# that represent file ranges with a length that is a multiple of 16 pages
# and that are shared by multiple consecutive ranges of the same file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick clone compress
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_cloner
-rm -f $seqres.full
-
test_clone_and_read_compressed_extent()
{
local mount_opts=$1
# Test that calling fallocate against a range which is already
# allocated does not truncate beyond EOF
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc
-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
+# Import common functions.
. ./common/filter
. ./common/defrag
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
# Test that a send operation works correctly with reflinked files (cloned
# extents which multiple files point to).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send clone punch
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Test that a send operation works correctly with reflinked files (cloned
# extents which multiple files point to) that have compressed extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send clone compress
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Test that sending and receiving snapshots across different filesystems works
# for full and incremental send operations.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Test that resending snapshots from a different filesystem is possible for
# both full and incremental send operations.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Test several cases of cloning inline extents that used to lead to file
# corruption or data loss.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick clone
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
_require_btrfs_mkfs_feature "no-holes"
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
test_cloning_inline_extents()
{
local mkfs_opts=$1
# does not result in leaking stale data (data past the truncation offset) nor
# losing data in the clone operation's destination file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick compress clone
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
_require_scratch
_require_cloner
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount "-o compress"
# btrfs quota scan/unmount sanity test
# Make sure that unmounting during a quota rescan doesn't crash
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto qgroup
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch
# btrfs quota scan/disable sanity test
# Make sure that disabling quotas during a quota rescan doesn't crash
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto qgroup
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch
$BTRFS_UTIL_PROG quota enable $SCRATCH_MNT
$BTRFS_UTIL_PROG quota disable $SCRATCH_MNT
-
echo "Silence is golden"
status=0
exit
# with the content they had before the fitrim operation. These regions of the
# device are reserved for a boot loader to use at its will.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs btrfs
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
# Write to the [0, 64Kb[ and [68Kb, 1Mb[ ranges of the device. These ranges are
# for files that have a full path containing more than one parent directory
# component.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send clone
tmp=`mktemp -d`
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch
_require_cp_reflink
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# deleted and crash, the next time we mount the filesystem, the log replay
# procedure will not fail and the snapshot is not present anymore.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick snapshot metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# Test log tree replay when qgroups are enabled and orphan roots (deleted
# snapshots) exist.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick snapshot metadata qgroup log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# the new directory or a file inside the new directory, the fsync succeeds,
# the fsync log is replayable and produces a correct result.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick snapshot metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
populate_testdir()
{
_run_btrfs_util_prog subvolume snapshot $SCRATCH_MNT \
# [PATCH] btrfs: handle non-fatal errors in btrfs_qgroup_inherit()
# http://thread.gmane.org/gmane.comp.file-systems.btrfs/54755
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick snapshot qgroup
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null
_scratch_mount
_run_btrfs_util_prog quota enable $SCRATCH_MNT
# Test that qgroup counts are valid after snapshot creation. This has
# been broken in btrfs since Linux v4.1
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick snapshot qgroup
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch
_require_btrfs_qgroup_report
-rm -f $seqres.full
-
# Force a small leaf size to make it easier to blow out our root
# subvolume tree
_scratch_mkfs "--nodesize 16384" >/dev/null
_scratch_unmount
-
# qgroup will be checked by fstest at _check_scratch_fs()
status=0
exit
# non-standard extent reference update, qgroup can't handle it correctly,
# and leads to corrupted qgroup numbers.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick qgroup balance
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Verify if all three checkpoints match
#
-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
+. ./common/preamble
+_begin_fstest auto replace volume balance
+# Override the default cleanup function.
_cleanup()
{
cd /
_btrfs_rescan_devices
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/module
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
#
# Verify if all three checkpoints match
#
-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
+. ./common/preamble
+_begin_fstest replace volume balance
+# Override the default cleanup function.
_cleanup()
{
cd /
_btrfs_rescan_devices
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/module
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_run_btrfs_util_prog filesystem df $SCRATCH_MNT
count=$(( count-- ))
-
#-------------degraded-init-------------------
echo >> $seqres.full
echo "-----Write degraded mount fill upto $max_fs_sz bytes-----" >> $seqres.full
#
# Regression test for leaking data space after hitting EDQUOTA
#
-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/preamble
+_begin_fstest auto quick qgroup limit
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
# in the directory hierarchy that involve switching the inode that directory
# entries point to.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Test that, under a particular scenario, an incremental send operation does
# not leak memory (which used to emit a warning in dmesg/syslog).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# operations under a particular scenario (the rmdir operation is sent before
# the target directory is empty).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# And unfortunately, btrfs send is one of these operations, and will cause
# softlock or OOM on systems with small memory(<4G).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone send
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test free space tree mount options.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
# write whose max extent size is not 128M (including compression and in-band
# dedupe).
#
-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
+. ./common/preamble
+_begin_fstest auto enospc
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# replaces an old inode that has the same number but different generation,
# and both are direct children of the subvolume/snapshot root.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# a new parent directory, deleting its previous parent directory and creating
# a new inode that has the same inode number as the old parent.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# have an entry with the same name that corresponds to different inodes in each
# snapshot.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# 3) populate data.
# 4) source has combination of non-extent and extent files.
# 5) convert it to btrfs, mount and verify contents.
-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.*
-}
+. ./common/preamble
+_begin_fstest auto convert
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
_require_command "$E2FSCK_PROG" e2fsck
_require_command "$TUNE2FS_PROG" tune2fs
-rm -f $seqres.full
-
BLOCK_SIZE=`_get_block_size $TEST_DIR`
EXT_MD5SUM="$tmp.ext43"
BTRFS_MD5SUM="$tmp.btrfs"
#
# Test that both incremental and full send operations preserve file holes.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/punch
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Test decompression in the middle of large extents. Regression test for Linux
# kernel commit 6e78b3f7a193 ("Btrfs: fix btrfs_decompress_buf2page()").
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto compress
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
#
# Finally we create files to exceed the quota.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto qgroup limit
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs btrfs
# We at least need 2GB of free space on $SCRATCH_DEV
_require_scratch_size $((2 * 1024 * 1024))
_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
_run_btrfs_util_prog qgroup limit -e 1G $SUBVOL
-
# Write and delete files within 1G limits, multiple times
for i in $(seq 1 5); do
for j in $(seq 1 240); do
# The upstream fix is
# commit 2e949b0a5592 ("Btrfs: fix invalid dereference in btrfs_retry_endio")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# The upstream fix is
# Commit 9d0d1c8b1c9d ("Btrfs: bring back repair during read")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# The upstream fix is
# commit 97bf5a5589aa ("Btrfs: fix segmentation fault when doing dio read")
#
-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/preamble
+_begin_fstest auto quick
+
+# Import common functions.
. ./common/filter
. ./common/dmdust
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# The upstream fix is
# commit 9d0d1c8b1c9d ("Btrfs: bring back repair during read")
#
-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/preamble
+_begin_fstest auto quick
+
+# Import common functions.
. ./common/filter
. ./common/dmdust
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# renamed, a new hard link added to it and some other inode B is renamed to
# the old name of inode A.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# then rename some file inode B to the name inode A had, for the case where the
# directory inode A is an ancestor of inode B in the parent snapshot.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# on all fds and fsync on all fds. Ensure that we get errors on all of them.
# Then fsync on all one last time and verify that all return 0.
#
-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
+. ./common/preamble
+_begin_fstest auto quick eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmerror
_require_scratch
_require_scratch_dev_pool
-rm -f $seqres.full
-
echo "Format and mount"
# Build a filesystem with 2 devices that stripes the data across
# some directory inode A, renaming a regular file inode B into the old name of
# inode A and finally creating a new hard link for inode B at directory inode A.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
#
# Test that direct IO writes work on RAID5 and RAID6 filesystems.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_scratch_dev_pool_get 4
-rm -f $seqres.full
-
test_direct_io_write()
{
local mkfs_options=$1
# has an extent at a file offset 0 that is not compressed and that is
# shared.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send compress
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# The patch to fix it is
# Btrfs: fix kernel oops while reading compressed data
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick dangerous
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# The fix is
# Btrfs: avoid losing data raid profile when deleting a device
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick volume
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Test that incremental send/receive operations don't corrupt metadata when
# qgroups are enabled.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick metadata qgroup send
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs btrfs
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
#
# Test for leaking quota reservations on preallocated files.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick qgroup limit
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This bug is going to be fixed by a patch for kernel titled
# "btrfs: correctly calculate item size used when item key collision happens"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_command $PYTHON2_PROG python2
-rm -f $seqres.full
-
# Currently in btrfs the node/leaf size can not be smaller than the page
# size (but it can be greater than the page size). So use the largest
# supported node/leaf size (64Kb) so that the test can run on any platform
# hard links has some of its hard links renamed in the send snapshot, with one
# of them getting the same path that some other inode had in the send snapshot.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
#
# Fixed by patch named "btrfs: Ensure btrfs_trim_fs can trim the whole fs".
#
-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/preamble
+_begin_fstest auto quick trim balance
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
# Btrfs: do not merge rbios if their fail stripe index are not identical
# Btrfs: make raid6 rebuild retry more
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick raid
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Btrfs: make raid6 rebuild retry more
# Btrfs: fix scrub to repair raid6 corruption
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick raid scrub
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# layout, if we punch a hole and fsync the file, at replay time the whole
# hole was preserved.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick punch log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_xfs_io_command "fpunch"
_require_odirect
-rm -f $seqres.full
-
run_test()
{
local punch_offset=$1
# errors, write to it again and call sync. Close the file, reopen it and
# then call fsync on it. Is the error reported?
#
-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
+. ./common/preamble
+_begin_fstest auto quick eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmerror
_require_dm_target error
-rm -f $seqres.full
-
# bring up dmerror device
_dmerror_init
# Create a seed device, mount it and, add a new device to create a
# sprout filesystem.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick volume seed
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Create a sprout device
# Make the sprout device a seed device and create a sprout device again
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick volume seed
-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
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Depends on the kernel patch
# c6a5d954950c btrfs: fail replace of seed device
-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
+. ./common/preamble
+_begin_fstest auto quick volume seed
+# Override the default cleanup function.
_cleanup()
{
cd /
_btrfs_rescan_devices
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Create a sprout device
# Remount RW
# Run device delete on the seed device
-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
+. ./common/preamble
+_begin_fstest auto quick volume
+# Override the default cleanup function.
_cleanup()
{
cd /
_btrfs_rescan_devices
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/module
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This behavior has been restricted long time but becomes allowed by kernel
# commit a79a464d5675 ("btrfs: Allow rmdir(2) to delete an empty subvolume")
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick subvol
create_subvol()
{
rm -r $1 >> $seqres.full 2>&1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch
# enabled while the quota rescan kernel thread is running, we will be able
# to mount the filesystem after the power failure.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick qgroup
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# This could be fixed by the following kernel commit:
# ac0b4145d662 ("btrfs: scrub: Don't use inode pages for device replace")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick replace volume
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# (or subvolume) has a file that is deleted while there is still a open file
# descriptor for that file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -fr $send_files_dir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# that has a prealloc (unwritten) extent beyond its EOF gets a hole punched
# in a section of that prealloc extent.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -fr $send_files_dir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# more space left to allocate in the filesystem and then snapshot the file's
# subvolume, after a clean shutdown the data was not lost.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick snapshot
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "falloc" "-k"
-rm -f $seqres.full
-
# Use a fixed size filesystem so that we can precisely fill the data block group
# mkfs.btrfs creates and allocate all unused space for a new data block group.
# It's important to not use the mixed block groups feature as well because we
# Fixed by the following kernel patch:
# "btrfs: qgroup: Dirty all qgroups before rescan"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick qgroup
-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
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
-
# Populate the fs
$BTRFS_UTIL_PROG subvolume create "$SCRATCH_MNT/subvol" > /dev/null
_pwrite_byte 0xcdcd 0 1M "$SCRATCH_MNT/subvol/file1" > /dev/null
$BTRFS_UTIL_PROG subvolume snapshot "$SCRATCH_MNT/subvol" \
"$SCRATCH_MNT/snapshot" > /dev/null
-
$BTRFS_UTIL_PROG quota enable "$SCRATCH_MNT" > /dev/null
$BTRFS_UTIL_PROG quota rescan -w "$SCRATCH_MNT" > /dev/null
# btrfs: use the file extent tree infrastructure
# btrfs: replace all uses of btrfs_ordered_update_i_size
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick log replay
-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
+# Import common functions.
. ./common/filter
. ./common/dmlogwrites
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Test swap file activation restrictions specific to Btrfs, swap file can't be
# CoW file nor compressed file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick swap
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-. ./common/rc
. ./common/filter
-rm -f $seqres.full
-
_supported_fs btrfs
_require_scratch_swapfile
# Test restrictions on operations that can be done on an active swap file
# specific to Btrfs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick swap
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-. ./common/rc
. ./common/filter
-rm -f $seqres.full
-
_supported_fs btrfs
_require_scratch_swapfile
#
# Test swap file activation on multiple devices.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick swap volume
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-. ./common/rc
. ./common/filter
-rm -f $seqres.full
-
_supported_fs btrfs
_require_scratch_dev_pool 2
_require_scratch_swapfile
#
# Test device remove/replace with an active swap file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick swap volume
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test relocation (balance and resize) with an active swap file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick swap balance
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-. ./common/rc
. ./common/filter
. ./common/btrfs
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs btrfs
_require_scratch_swapfile
# become descendents of multiple directories that used to be their ancestors in
# the parent snapshot. This used to trigger an infinite loop in the kernel code.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# This bug is going to be fixed by a patch for the kernel titled
# "btrfs: qgroup: Don't trigger backref walk at delayed ref insert time".
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto qgroup dangerous
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This bug is going to be fxied by a patch for kernel titled
# "btrfs: qgroup: Make qgroup async transaction commit more aggressive"
#
-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/preamble
+_begin_fstest auto quick qgroup limit
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
# This bug is going to be fixed by a patch for kernel title
# "btrfs: don't end the transaction for delayed refs in throttle"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick balance
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# There is one proposed patch for btrfs-progs to fix it, titled:
# "btrfs-progs: balance: Sync the fs before balancing metadata chunks"
#
-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/preamble
+_begin_fstest auto quick balance
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
# Regression test for read corruption of compressed and shared extents after
# punching holes into a file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick clone compress punch
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount "-o compress"
# Verify that when a device is removed from a multi-device
# filesystem its superblock copies are correctly deleted
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick volume
-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
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch
# Could be fixed by
# a9261d4125c9 ("btrfs: harden agaist duplicate fsid on scanned devices")
#
-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
+. ./common/preamble
+_begin_fstest volume
mnt=$TEST_DIR/$seq.mnt
+# Override the default cleanup function.
_cleanup()
{
rm -rf $mnt > /dev/null 2>&1
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch_dev_pool 2
# readonly mode and then use it for send a operation, the send stream will
# contain the delalloc data - that is, no data loss happens.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send volume
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -fr $send_files_dir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# with large differences between the parent and send snapshots in order to hit
# such issues with a good probability.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto send dedupe clone balance
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/attr
. ./common/filter
. ./common/reflink
_require_scratch_dedupe
_require_attrs
-rm -f $seqres.full
-
# We at least need 8GB of free space on $SCRATCH_DEV
_require_scratch_size $((8 * 1024 * 1024))
# start after its size and hole is punched (after the first snapshot is made)
# that removes all extents from some offset up to the file's size.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send prealloc punch
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -fr $send_files_dir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# commit ac765f83f1397646 ("Btrfs: fix data corruption due to cloning of eof
# block"), or cause silent data corruption for older kernels.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -fr $send_files_dir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# A general test to validate that balance and qgroups work correctly when
# balance needs to be resumed on mount.
#
-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/preamble
+_begin_fstest auto quick replay balance qgroup
+
+# Import common functions.
. ./common/filter
. ./common/dmlogwrites
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Test that an incremental send operation works after deduplicating into the
# same file in both the parent and send snapshots.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send dedupe
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Test btrfs consistency after each FUA for a workload with snapshot creation
# and removal
#
-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
+. ./common/preamble
+_begin_fstest auto replay snapshot stress
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/dmlogwrites
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# The fix is titled:
# "btrfs: qgroup: Fix the wrong target io_tree when freeing reserved data space"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick qgroup enospc limit
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# tree-checker: Verify dev item").
# The fix is titled: "btrfs: tree-checker: Fix wrong check on max devid"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto volume
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Test raid profile conversion. It's sufficient to test all dest profiles as
# source profiles just rely on being able to read the data and metadata.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto volume balance
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
_supported_fs btrfs
_require_scratch_dev_pool 4
-
declare -a TEST_VECTORS=(
# $nr_dev_min:$data:$metadata:$data_convert:$metadata_convert
"4:single:raid1"
#
# Will do log replay and check the filesystem.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto metadata log volume
-here=`pwd`
-tmp=/tmp/$$
fio_config=$tmp.fio
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmthin
. ./common/dmlogwrites
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# btrfs: include non-missing as a qualifier for the latest_bdev
# btrfs: remove identified alien btrfs device in open_fs_devices
#
-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
+. ./common/preamble
+_begin_fstest auto quick volume
+# Override the default cleanup function.
_cleanup()
{
$UMOUNT_PROG $TEST_DIR/$seq.mnt >/dev/null 2>&1
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_test
# Bug fixed in:
# btrfs: remove identified alien device in open_fs_devices
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest quick volume
-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
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_command "$WIPEFS_PROG" wipefs
# The fix is: "btrfs: extent-tree: Ensure we trim ranges across block group
# boundary"
#
-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
+. ./common/preamble
+_begin_fstest auto quick trim
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
_pwrite_byte 0xcd 0 1M $loop_mnt/tail_padding > /dev/null
sync
-
$XFS_IO_PROG -c "fiemap" $loop_mnt/cross_boundary >> $seqres.full
# Ensure all extent are continuous
# Btrfs fiemap will merge continuous results, so the output should be only
# Check that send operations (full and incremental) are able to issue clone
# operations for extents that are shared between the same file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -fr $send_files_dir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/punch
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# layout, if we punch a hole that starts at file offset 0 and fsync the file,
# after replaying the log the hole exists.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick punch log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/attr
. ./common/filter
. ./common/dmflakey
_require_btrfs_mkfs_feature "no-holes"
_require_odirect
-rm -f $seqres.full
-
run_test_leading_hole()
{
# We create the filesystem with a node size of 64Kb because we need to
_cleanup_flakey
}
-
echo "Testing with hole offset 0 hole length 65536"
run_test_leading_hole
#
# Regression test for fix "btrfs: fix invalid removal of root ref"
#
-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.*
-}
-
-. ./common/rc
-. ./common/filter
+. ./common/preamble
+_begin_fstest auto quick subvol snapshot
-rm -f $seqres.full
+. ./common/filter
_supported_fs btrfs
# extents with itself in the send snapshot, with a hole between them, and the
# file size has increased in the send snapshot.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -fr $send_files_dir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Test if the unaligned (by size and offset) punch hole is successful when FS
# is at ENOSPC.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick punch
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# "Btrfs: implement full reflink support for inline extents"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick clone compress
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_scratch_reflink
# btrfs: use the file extent tree infrastructure
# btrfs: replace all uses of btrfs_ordered_update_i_size
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick log replay
-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
+# Import common functions.
. ./common/filter
. ./common/dmlogwrites
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
_require_test
# Test large DIO reads and writes with various profiles. Regression test for
# patch "btrfs: fix RAID direct I/O reads with alternate csums".
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw raid
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs btrfs
# we check scratch dev after each loop
_require_scratch_nocheck
# Test subvolume deletion using the subvolume id, even when the subvolume in
# question is in a different mount space.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick subvol
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
# do not end up with a missing file extent representing a hole. This applies
# only when not using the NO_HOLES feature.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/attr
. ./common/filter
. ./common/dmflakey
_require_btrfs_mkfs_feature "no-holes"
_require_xfs_io_command "sync_range"
-rm -f $seqres.full
-
_scratch_mkfs -O ^no-holes >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# Test that a new snapshot created with qgroup inherit passed should mark
# qgroup numbers inconsistent.
#
-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/preamble
+_begin_fstest auto quick qgroup snapshot
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
# and implicit file holes after a power failure. Test both without and with
# the NO_HOLES feature.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log prealloc
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_btrfs_mkfs_feature "no-holes"
_require_dm_target flakey
-rm -f $seqres.full
-
run_test()
{
# Create our test file with 2 consecutive prealloc extents, each with a size
# Test if unmounting a fs with balance canceled can lead to crash.
# This needs CONFIG_BTRFS_DEBUG compiled, which adds extra unmount time self-test
#
-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
+. ./common/preamble
+_begin_fstest auto balance dangerous
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test if canceling a running balance can lead to dead looping balance
#
-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
+. ./common/preamble
+_begin_fstest auto balance dangerous
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs btrfs
_require_scratch
#
# Test if the file capabilities aren't lost after full and incremental send
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick send snapshot
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs btrfs
_require_scratch
_require_command "$SETCAP_PROG" setcap
# counters. This is fixed by the following linux kernel commit:
# 814723e0a55a ("btrfs: increment device corruption error in case of checksum error")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
get_physical()
{
# Fixed in kernel patch:
# btrfs: btrfs_show_devname don't traverse into the seed fsid
-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/preamble
+_begin_fstest auto quick seed
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
_supported_fs btrfs
# - shrink device
# - fstrim
#
-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/preamble
+_begin_fstest auto quick trim dangerous
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
$FSTRIM_PROG -v $SCRATCH_MNT >> $seqres.full 2>&1 || \
_notrun "FSTRIM not supported"
-
# Shrink the fs to 4G, so the existing CHUNK_TRIMMED bits are beyond
# device boundary
$BTRFS_UTIL_PROG filesystem resize 1:-1G "$SCRATCH_MNT" >> $seqres.full
# Make a seed device, add a sprout to it, and then make sure we can still read
# the device stats for both devices after we remount with the new sprout device.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick volume
-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
+# Import common functions.
. ./common/filter
. ./common/filter.btrfs
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# currently.
#
-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
+. ./common/preamble
+_begin_fstest auto quick volume
+# Override the default cleanup function.
_cleanup()
{
cd /
_btrfs_rescan_devices
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
# Test all existent mount options of btrfs
# * device= argument is already being test by btrfs/125
# * space cache test already covered by test btrfs/131
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs btrfs
_require_scratch
# one file has its name and location swapped with a directory for which it used
# to have a directory entry in it.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# two other inodes that correspond to different directories, and one of these
# directories is the parent of the other directory.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# allocated chunks in the new device were not trim/discarded by mounting the
# new device only in degraded mode, as this is the easiest way to verify it.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick replace trim
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_dev_pool 3
_require_command "$WIPEFS_PROG" wipefs
-rm -f $seqres.full
-
_scratch_dev_pool_get 2
_spare_dev_get
dev1=$(echo $SCRATCH_DEV_POOL | $AWK_PROG '{ print $1 }')
#
# Test the assign functionality of qgroups
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick qgroup
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
_check_scratch_fs
}
-
assign_no_shared_test
assign_shared_test
# Create a seed FS. Add a RW device to make it sprout FS and then delete
# the seed device.
-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
+. ./common/preamble
+_begin_fstest auto quick volume seed
+# Override the default cleanup function.
_cleanup()
{
cd /
_btrfs_rescan_devices
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Test several (btrfs specific) scenarios with RWF_NOWAIT writes, cases where
# they should fail and cases where they should succeed.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-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/preamble
+_begin_fstest auto quick rw snapshot clone prealloc punch
+
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command falloc -k
_require_xfs_io_command fpunch
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# filesystem, mounting the filesystem again and creating a new file (or
# directory).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
#
# Test correct operation of free objectid related functionality
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick volume
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# different offsets, and a large part of that extent was overwritten, so all the
# reflinks only point to subranges of the extent.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# Test if btrfs qgroup would crash if we're modifying the fs
# after exceeding the limit
#
-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/preamble
+_begin_fstest auto quick qgroup limit
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
# and we do not get stale data corresponding to file extents that existed before
# truncating the file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick clone log replay
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_btrfs_mkfs_feature "no-holes"
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs -O no-holes >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# reservation errors")
# 4d14c5cde5c2 ("btrfs: don't flush from btrfs_delayed_inode_reserve_metadata")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick qgroup limit
-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
+# Import common functions.
. ./common/filter
writer()
done
}
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
# on RO mounts and that after remounting a filesystem from RO to RW mode, it is
# performed.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick subvolume
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_dm_target flakey
_require_btrfs_command inspect-internal dump-tree
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# Test cases where a direct IO write, with O_DSYNC, can not be done and has to
# fallback to a buffered write.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick compress rw
-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
+# Import common functions.
. ./common/filter
. ./common/attr
_require_odirect
_require_chattr c
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# send/receive operations only apply the capability to the first file, the one
# for which we have set a capability.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# previous fsync of another file, as well as that mtime and ctime are correct.
# Test both with COW and NOCOW writes.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
# The comments inside the function mentioning specific inode numbers and IDs
# (transactions, log commits, etc) are for the case where the function is run
# on a freshly created filesystem, but the logic and reasoning still applies
# old block group gets deleted. On block group deletion, the underlying device
# zone also needs to be reset.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick zone balance
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs btrfs
# Kernel bug is fixed by the commit:
# btrfs: fix unmountable seed device after fstrim
-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/preamble
+_begin_fstest auto quick seed trim
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
# we are able to mount the filesystem and that the moved directory exists only
# as a child of the directory we moved it into.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
# The test requires a very specific layout of keys and items in the fs/subvolume
# btree to trigger a bug. So we want to make sure that on whatever platform we
# are, we have the same leaf/node size.
# failure on the last fsync and turn the filesystem to RO mode because of a
# transaction abort.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick prealloc log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_dm_target flakey
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
_mount_flakey
-
# Create our test file with 2 preallocated extents. Leave a 1M hole between them
# to ensure that we get two file extent items that will never be merged into a
# single one. The extents are contiguous on disk, which will later result in the
# of a directory and another name (hardlink) with the old name and location of
# another file that was located in that same directory.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick send
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
send_files_dir=$TEST_DIR/btrfs-test-$seq
-rm -f $seqres.full
rm -fr $send_files_dir
mkdir $send_files_dir
# 1) the beginning (1st object) of dst file, 2) the end (last object) of dst
# file and 3) the middle of the dst file.
#
-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 -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick copy
# get standard environment
-. common/rc
. common/filter
. common/attr
. common/reflink
workdir=$TEST_DIR/test-$seq
rm -rf $workdir
mkdir $workdir
-rm -f $seqres.full
check_range()
{
# ceph OSD: dcd6a99ef9f5 ("osd: add new 'copy-from2' operation")
# linux kernel: 78beb0ff2fec ("ceph: use copy-from2 op in copy_file_range")
#
-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 -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick copy
# get standard environment
-. common/rc
. common/filter
. common/attr
workdir=$TEST_DIR/test-$seq
rm -rf $workdir
mkdir $workdir
-rm -f $seqres.full
# Use 4M object size
objsz=4194304
#
# Test copy_file_range with infile = outfile
#
-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 -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick copy
# get standard environment
-. common/rc
. common/filter
. common/attr
. common/reflink
workdir=$TEST_DIR/test-$seq
rm -rf $workdir
mkdir $workdir
-rm -f $seqres.full
check_range()
{
#
# https://tracker.ceph.com/issues/48203
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs ceph
#
# Sanity test for server-side copies initiated via CIFS_IOC_COPYCHUNK_FILE
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
rm -f $tmp.*
rm -rf $TEST_DIR/$$
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# Test fallocate FALLOC_FL_ZERO_RANGE
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto prealloc quick zero
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/punch
# https://lore.kernel.org/linux-ext4/20200717090605.2612-1-lczerner@redhat.com/
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest shutdown mount auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
blockdev --setrw $SCRATCH_LOGDEV
blockdev --setrw $SCRATCH_DEV
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
echo "unmounting read-only filesystem"
_scratch_unmount 2>&1 | _filter_scratch | _filter_ending_dot
-
echo "mounting filesystem with -o norecovery with a read-only log device:"
_try_scratch_mount -o norecovery 2>&1 | _filter_ro_mount | _filter_scratch
echo "unmounting read-only filesystem"
# success, all done
echo "*** done"
-rm -f $seqres.full
status=0
# b5b6077 ext4: fix wrong assert in ext4_mb_normalize_request()
# This testcase checks whether this bug has been fixed.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
_scratch_unmount
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_scratch_ext4_feature "bigalloc"
-rm -f $seqres.full
-
$MKFS_EXT4_PROG -F -O bigalloc -C 65536 -g 256 $SCRATCH_DEV 512m \
>> $seqres.full 2>&1
_scratch_mount
#
# Test "dump | restore"(as opposed to a tape)
#
-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
+. ./common/preamble
+_begin_fstest auto dump
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $restore_dir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
dump_dir=$SCRATCH_MNT/dump_restore_dir
_require_command "$DUMP_PROG" dump
_require_command "$RESTORE_PROG" restore
-rm -f $seqres.full
echo "Silence is golden"
_scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1
# ext4: be more strict when migrating to non-extent based file
# ext4: correctly migrate a file with a hole at the beginning
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick metadata ioctl rw
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_command "$CHATTR_PROG" chattr
-rm -f $seqres.full
-
echo "Silence is golden"
_scratch_mkfs >>$seqres.full 2>&1
# the kernel reacts, how e2fsck fares in fixing the mess, and then
# try more kernel accesses to see if it really fixed things.
#
-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
+. ./common/preamble
+_begin_fstest dangerous_fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
return 1
}
-rm -f $seqres.full
echo "See interesting results in $seqres.full" | sed -e "s,$RESULT_DIR,RESULT_DIR,g"
SRCDIR=`pwd`
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-b 32 -v"
# Create and populate an ext4 filesystem, corrupt the primary superblock, then
# see how the kernel and e2fsck deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an ext4 filesystem, corrupt a group descriptor, then
# see how the kernel and e2fsck deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an ext4 filesystem, corrupt a block bitmap, then
# see how the kernel and e2fsck deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an ext4 filesystem, corrupt an inode bitmap, then
# see how the kernel and e2fsck deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
_require_attrs
_require_command "$RESIZE2FS_PROG" resize2fs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an ext4 filesystem, corrupt the MMP block, then
# see how the kernel and e2fsck deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an ext4 filesystem, corrupt the journal, then
# see how the kernel and e2fsck deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an ext4 filesystem, corrupt an inode, then see how
# the kernel and e2fsck deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an ext4 filesystem, corrupt root directory, then
# see how the kernel and e2fsck deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an ext4 filesystem, corrupt an extent tree block, then
# see how the kernel and e2fsck deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers punch
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an ext4 filesystem, corrupt a dirent block, then
# see how the kernel and e2fsck deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an ext4 filesystem, corrupt a htree block, then
# see how the kernel and e2fsck deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an ext4 filesystem, corrupt a xattr block, then
# see how the kernel and e2fsck deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an ext4 filesystem, corrupt a big symlink, then
# see how the kernel and e2fsck deal with it. (They won't)
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
test -n "${FORCE_FUZZ}" || _require_scratch_ext4_crc
_require_attrs
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# size is smaller than page size would cause integrity issue on the
# partial-blocksize part when copying data between orign file and donor file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick ioctl rw defrag
-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
+# Import common functions.
. ./common/filter
. ./common/defrag
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs ext4
_require_scratch
# Regression test for commit:
# 688f869 ext4: Initialize fsync transaction ids in ext4_new_inode()
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
# real QA test starts here
_supported_fs ext4
#
# Test extending of i_extra_isize code
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick attr dangerous
do_setfattr()
{
$SETFATTR_PROG $@ 2>&1 | _filter_scratch
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs ext4
_require_scratch
# filesystem with all types of metadata and create an image of the
# metadata. Check that fsck is happy with the resulting fs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick scrub
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Regression test for 0d06863f903a ("ext4: don't BUG when truncating encrypted
# inodes on the orphan list").
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick encrypt dangerous
# get standard environment and checks
-. ./common/rc
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs ext4
_require_scratch_encryption
# Regression test for commit:
# 3a4b77c ("ext4: validate s_first_meta_bg at mount time").
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick fuzzers dangerous
# get standard environment and checks
-. ./common/rc
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs ext4
_require_scratch_nocheck
# allows storing xattr values in external inodes and so raises xattr value
# size limit to 64k.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick attr
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs ext4
_require_scratch
#
# Check that getfsmap reports the BG metadata we're expecting.
#
-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
+. ./common/preamble
+_begin_fstest auto quick fsmap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f "$tmp".* $TEST_DIR/fsmap $TEST_DIR/testout
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Populate filesystem, check that fsmap -n10000 matches fsmap -n1.
#
-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
+. ./common/preamble
+_begin_fstest auto quick fsmap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f "$tmp".* $TEST_DIR/a $TEST_DIR/b
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
#
# Check that getfsmap reports external log devices
#
-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
+. ./common/preamble
+_begin_fstest auto quick fsmap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f "$tmp".* $TEST_DIR/fsmap $TEST_DIR/testout
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# ext4: prevent data corruption with journaling + DAX
# created by Ross Zwisler <ross.zwisler@linux.intel.com>
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick dax
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs ext4
_require_scratch_dax_mountopt "dax"
# ext4: prevent data corruption with inline data + DAX
# created by Ross Zwisler <ross.zwisler@linux.intel.com>
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick dax
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# DAX needs to be off so we can create an inode with inline data
SAVE_MOUNT_OPTIONS="$MOUNT_OPTIONS"
MOUNT_OPTIONS=""
# Ext4 online resize tests of small and crucial resizes with bigalloc
# feature.
#
-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
+. ./common/preamble
+_begin_fstest auto quick ioctl resize
BLK_SIZ=4096
CLUSTER_SIZ=4096
_destroy_loop_device $LOOP_DEVICE && LOOP_DEVICE=
}
+# Override the default cleanup function.
_cleanup()
{
cd /
}
# get standard environment and checks
-. ./common/rc
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
# real QA test starts here
_supported_fs ext4
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-rm -f $seqres.full
-
mkdir -p $IMG_MNT || _fail "cannot create loopback mount point"
# Check if online resizing with bigalloc is supported by the kernel
# Test s_inodes_count overflow for huge filesystems. This bug was fixed
# by commit "ext4: Forbid overflowing inode count when resizing".
#
-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
+. ./common/preamble
+_begin_fstest auto ioctl resize
+# Override the default cleanup function.
_cleanup()
{
umount $SCRATCH_MNT >/dev/null 2>&1
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmhugedisk
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs ext4
_require_scratch_nocheck
# The bug was fixed by commit
# "ext4: make sure enough credits are reserved for dioread_nolock writes"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# lower than current size and leads to a BUG_ON in in ext4_alloc_group_tables()
# hitting on flex_gd->count == 0.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick resize
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_exclude_scratch_mount_option dax
_require_command "$RESIZE2FS_PROG" resize2fs
-rm -f $seqres.full
-
$MKFS_EXT4_PROG -F -b 1024 -E "resize=262144" $SCRATCH_DEV 32768 >> $seqres.full 2>&1
_scratch_mount
#
# 721e3eb ext4: lock i_mutex when truncating orphan inodes
#
-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/preamble
+_begin_fstest auto quick
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs ext3 ext4
_require_scratch
-rm -f $seqres.full
echo "Silence is golden"
_scratch_mkfs_sized $((16*1024*1024)) >>$seqres.full 2>&1
#
# 744692d ext4: use ext4_get_block_write in buffer write
#
-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/preamble
+_begin_fstest auto quick
+
+# Import common functions.
. ./common/filter
# real QA test starts here
# nofsck as we modify sb via debugfs
_require_scratch_nocheck
-# remove previous $seqres.full before test
-rm -f $seqres.full
echo "Silence is golden"
_scratch_mkfs >>$seqres.full 2>&1
# Regression test for commit:
# c9eb13a ext4: fix hang when processing corrupted orphaned inode list
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
# real QA test starts here
_supported_fs ext3 ext4
_require_scratch
_require_command "$DEBUGFS_PROG" debugfs
-# remove previous $seqres.full before test
-rm -f $seqres.full
echo "Silence is golden"
# Although the bug only happens when last_orphan is set to 5
#
# Test data journaling flag switch for a single file
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto enospc rw
# ext3 and ext4 don't support direct IO in journalling mode
write_opt_list="iflag=noatime conv=notrunc conv=fsync"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_workout()
{
_require_scratch
_exclude_scratch_mount_option dax
-rm -f $seqres.full
_scratch_mkfs_sized $((64 * 1024 * 1024)) >> $seqres.full 2>&1
_scratch_mount
# So, create this malformed inode and try a buffered append to make
# sure we catch this situation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers
PIDS=""
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_disable_dmesg_check
_require_command "$DEBUGFS_PROG"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
# So, create this malformed inode and try a dio append to make sure we
# catch this situation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers
PIDS=""
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_disable_dmesg_check
_require_command "$DEBUGFS_PROG"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
#
# Test overhead & df output for extN filesystems
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs ext2 ext3 ext4
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
# Get the honest truth about block counts straight from metadata on disk
#
# Test file timestamps are only precise to seconds with 128-byte inodes."
#
-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/preamble
+_begin_fstest auto quick
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
_supported_fs ext3 ext4
#
# Test file timestamps are precise to nanoseconds with 256-byte inodes
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs ext4
_require_scratch
# Test subdirectory limit of ext4.
# We create more than 65000 subdirectories on the ext4 filesystem.
#
-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
+. ./common/preamble
+_begin_fstest auto dir
SHORT_DIR=1
LONG_DIR=2
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs ext4
# This test is to check whether unwritten extents gets properly converted
# to written extent on a filesystem with bs < ps with dioread_nolock.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto prealloc quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_require_check_dmesg
_supported_fs ext4
_require_scratch
# This is a regression test for kernel patch:
# commit aa2f77920b74 ("ext4: disallow modifying DAX inode flag if inline_data has been set")
-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/preamble
+_begin_fstest auto quick dax
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
_supported_fs ext4
# Test wiping of ext4_dir_entry2 data upon file removal, conversion
# to htree, and splitting of htree nodes
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick dir
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs ext4
# Regression test for kernel commit a149d2a5cabb (ext4: fix check to prevent
# false positive report of incorrect used inodes)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs ext4
_require_scratch
# Test checkpoint and zeroout of journal via ioctl EXT4_IOC_CHECKPOINT
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto ioctl quick
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs ext4
echo "$get_extents"
}
-
# checks all extents are zero'd out except for the superblock
# arg 1: extents (output of get_journal_extents())
check_extents() {
#
# Regression testcase for d583fb87a3ff0 (ext4 extent corruption)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_exclude_scratch_mount_option "data" "commit" "journal_checksum" \
"journal_async_commit"
-rm -f $seqres.full
_scratch_mkfs_sized $((128 * 1024 * 1024)) >> $seqres.full 2>&1
# -onoload and EXT4_SYNC_FL on file is important becase result in
#
# Ext4 defragmentation stress test
# Defragment file while other task does direct io
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest aio auto ioctl rw stress defrag
-here=`pwd`
-tmp=/tmp/$$
fio_config=$tmp.fio
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/defrag
_require_fio $fio_config
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
# Ext4 defragmentation stress test
# Perform defragmentation on file under buffered io
# while third task does direct io to donor file
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest aio auto ioctl rw stress defrag
-here=`pwd`
-tmp=/tmp/$$
fio_config=$tmp.fio
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/defrag
_require_fio $fio_config
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
# Ext4 defragmentation stress test
# Two defrag tasks use common donor file
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest aio auto ioctl rw stress defrag
-here=`pwd`
-tmp=/tmp/$$
fio_config=$tmp.fio
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/defrag
_require_fio $fio_config
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
# Several threads perform defragmentation at random position
# using 'inplace' mode (allocate and free blocks inside defrag event)
# which significantly improve load pressure on block allocator.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest aio auto ioctl rw stress defrag
-here=`pwd`
-tmp=/tmp/$$
fio_config=$tmp.fio
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/defrag
_require_fio $fio_config
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
# Regression test for commit:
# 9559996 ext4: remove mb_groups before tearing down the buddy_cache
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto
PIDS=""
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
kill $PIDS >/dev/null 2>&1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
-rm -f $seqres.full
echo "Silence is golden"
DEV_BASENAME=$(_short_dev $SCRATCH_DEV)
# Regression test for commit:
# c5c72d8 ext4: fix online resizing for ext3-compat file systems
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw resize quick
PIDS=""
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_scratch_unmount
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_command "$RESIZE2FS_PROG" resize2fs
-rm -f $seqres.full
-
# Make a small ext4 fs with extents disabled & mount it
features="^extents"
if grep -q 64bit /etc/mke2fs.conf ; then
#
# Check data integrity during defrag compacting
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto ioctl rw defrag
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/defrag
# Disable all sync operations to get higher load
_require_defrag
_require_xfs_io_command "falloc"
-rm -f $seqres.full
_scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1
_scratch_mount
# EXT4_IOC_MOVE_EXT simply swap extents between target and donor inode.
# So if ioctl was performed twice then inode's layout should not change.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto ioctl rw prealloc quick defrag
PIDS=""
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/defrag
_require_defrag
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
_workout()
{
nr=$1
# In ext4, up to 132 bytes of data can be stored in 256 bytes-sized inode.
# In f2fs, up to 3.4KB of data can be embedded into 4KB-sized inode block.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-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
+# Import common functions.
. ./common/filter
_supported_fs f2fs
# algorithm shouldn't make a difference for the purpose of this test. So we
# just test LZ4.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw encrypt compress
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-. ./common/rc
. ./common/filter
. ./common/f2fs
. ./common/encrypt
-rm -f $seqres.full
-
_supported_fs f2fs
# Prerequisites to create a file that is both encrypted and LZ4-compressed
# config has one line per file with filename and byte size, else use
# the default one below.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw dir udf auto quick
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-tmp=/tmp/$$
-here=`pwd`
status=1
done_cleanup=false
-trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
+_register_cleanup "_cleanup; rm -f $tmp.*"
# real QA test starts here
_supported_fs generic
$verbose && echo
}
+# Override the default cleanup function.
_cleanup()
{
# cleanup
fi
}
-rm -f $seqres.full
status=0
_cleanup
status=1
#
# simple inode link count test for a regular file
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest metadata udf auto quick
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-tmp=/tmp/$$
-here=`pwd`
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
# real QA test starts here
_supported_fs generic
_require_test
_require_hardlinks
-rm -f $seqres.full
-
echo "Silence is goodness ..."
# ensure target directory exists
# never updated on read-only subvolumes. (Regression test for bug fixed
# with commit 93fd63c2f001ca6797c6b15b696a484b165b4800)
#
-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 -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest atime auto quick
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_atime
_require_relatime
-rm -f $seqres.full
-
if [ "$FSTYP" = "exfat" ]; then
# exfat's timestamp for access_time has double seconds granularity
access_delay=2.1
#
# Test O_TMPFILE opens, and linking them back into the namespace.
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f ${testfile}
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_xfs_io_command "-T"
_require_xfs_io_command "flink"
-rm -f $seqres.full
-
testfile="${TEST_DIR}/tst-tmpfile-flink"
# test creating a r/w tmpfile, do I/O and link it into the namespace
# limit point is unimportant, just checking that we do hit it).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dir udf auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd $TEST_DIR
fi
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_test
_require_symlinks
-
cd $TEST_DIR
o=empty_file
#
# permname
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dir udf auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
'
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# and checks that error codes make sense with its
# memory of the files created.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dir udf auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $TEST_DIR/$seq
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
_require_test
-status=1 # default failure
sourcefile=$tmp.nametest
seed=1
iterations=100000
# Primarily tests page boundries and boundries that are
# off-by-one to ensure we're only tossing what's expected
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc zero
-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
+# Import common functions.
. ./common/filter
. ./common/punch
#
# Test fallocate FALLOC_FL_ZERO_RANGE
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc zero
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/punch
#
# dbtest
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest other udf auto
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
-e '/using [0-9][0-9]* as seed/s//using BLEEP as seed/'
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_require_test_program "dbtest"
_supported_fs generic
_require_test
-rm -f $seqres.full
-
cd $TEST_DIR
$here/src/dbtest -l 5 -n 1000 2>&1 | tee -a $seqres.full | _filter_dbtest
#
# dirstress
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dir udf auto quick
out=""
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
[ -n "$out" ] && rm -rf $out
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
out=$TEST_DIR/dirstress.$$
-rm -f $seqres.full
-
_test()
{
test="$1"
# type of extents. These tests are based on generic/255 test case.
# For the type of tests, check the description of _test_generic_punch
# in common/rc.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc punch collapse
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
+# Import common functions.
# we need to include common/punch to get defination fo filter functions
-. ./common/rc
. ./common/filter
. ./common/punch
#
# fsstress
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest other ioctl udf auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $TEST_DIR/fsstress.$$.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_do_test()
_supported_fs generic
_require_test
-rm -f $seqres.full
echo "brevity is wit..."
count=1000
_do_test 3 "-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20" $count
# if all ok by here then probably don't need $seqres.full
-rm -f $seqres.full
exit
#
# truncfile
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw udf auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $TEST_DIR/truncfile.$$.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs generic
#
# check out-of-space behaviour
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest other auto quick enospc
-here=`pwd`
-tmp=/tmp/$$
-status=1 # success is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
+# Override the default cleanup function.
_cleanup()
{
_scratch_unmount
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
_free()
{
_df_dir $SCRATCH_MNT | $AWK_PROG '{ print $5 }'
|| _fail "mkfs failed"
_scratch_mount
out=$SCRATCH_MNT/fillup.$$
-rm -f $seqres.full
free0=`_free`
if [ -z "$free0" ]
# type of extents. These tests are based on generic/255 test case.
# For the type of tests, check the description of _test_generic_punch
# in common/rc.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc punch collapse
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
+# Import common functions.
# we need to include common/punch to get defination fo filter functions
-. ./common/rc
. ./common/filter
. ./common/punch
# until the file is left with 80 blocks and as much number of extents.
# Also check for file system consistency after completing this operation
# for each blocksize.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto prealloc collapse
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Basic defragmentation sanity tests
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto fsr quick defrag
-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
+# Import common functions.
. ./common/filter
. ./common/defrag
done
_defrag --before 16 --after 16 $fragfile
-rm -f $seqres.full
status=0
exit
# Run fsstress and fio(dio/aio and mmap) and simulate disk failure
# check filesystem consistency at the end.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest aio dangerous enospc rw stress
-here=`pwd`
-tmp=/tmp/$$
fio_config=$tmp.fio
-status=1 # failure is the default!
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs generic
_require_scratch
echo 0 > $SYSFS_BDEV/make-it-fail
}
+# Override the default cleanup function.
_cleanup()
{
poweron_scratch_dev
disallow_fail_make_request
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 1 2 3 15
RUN_TIME=$((20+10*$TIME_FACTOR))
NUM_JOBS=$((4*LOAD_FACTOR))
# real QA test starts here
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
_scratch_mount
allow_fail_make_request
#
# extended attributes
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest metadata attr udf auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.* $testfile; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
_require_test
_require_attrs
-rm -f $seqres.full
-
testfile=$TEST_DIR/attribute_$$
echo "*** list non-existant file"
# type of extents. These tests are based on generic/255 test case.
# For the type of tests, check the description of _test_generic_punch
# in common/rc.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc punch collapse
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
+# Import common functions.
# we need to include common/punch to get defination fo filter functions
-. ./common/rc
. ./common/filter
. ./common/punch
# type of extents. These tests are based on generic/255 test case.
# For the type of tests, check the description of _test_generic_punch
# in common/rc.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc punch collapse
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
+# Import common functions.
# we need to include common/punch to get defination fo filter functions
-. ./common/rc
. ./common/filter
. ./common/punch
#
# Check renameat2 syscall without flags
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/renameat2
_supported_fs generic
#
# Check renameat2 syscall with RENAME_NOREPLACE flag
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/renameat2
_supported_fs generic
#
# Check renameat2 syscall with RENAME_EXCHANGE flag
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/renameat2
_supported_fs generic
#
# Test out ACL count limits
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest acl quick auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # FAILure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
+# Override the default cleanup function.
_cleanup()
{
cd /
_require_acls
_require_acl_get_max
-rm -f $seqres.full
-
# get dir
cd $TEST_DIR
rm -rf $seq.dir1
fi
}
-
echo ""
echo "=== Test out large ACLs ==="
touch largeaclfile
# Regression test for
# 34cf865 ext4: fix deadlock when writing in ENOSPC conditions
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto enospc
create_file()
{
done
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
-rm -f $seqres.full
echo "Silence is golden"
_scratch_mkfs_sized $((256 * 1024 * 1024)) >>$seqres.full 2>&1
# ede4ceb prepend_path() needs to reinitialize dentry/vfsmount/mnt on restarts
# f650080 __dentry_path() fixes
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# correctly written. This can expose data corruption bugs on filesystems where
# the block size is smaller than the page size.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# correctly written. This can expose data corruption bugs on filesystems where
# the block size is smaller than the page size.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# correctly written and aren't left behind causing invalidation or data
# corruption issues.
#
-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/preamble
+_begin_fstest auto quick prealloc rw collapse
+
+# Import common functions.
. ./common/filter
# real QA test starts here
# extents on I/O completion. This causes data corruption as unwritten extents
# are always read back as zeroes.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/punch
# real QA test starts here
-rm -f $seqres.full
_syncloop()
{
# without any indirect block reservation whatsoever. This leads to assert
# failures and possibly other problems in XFS.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw zero
-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
+# Import common functions.
# real QA test starts here
-rm -f $seqres.full
# Modify as appropriate.
_supported_fs generic
#
# Btrfs: fix directory recovery from fsync log
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# Check overwriting rename system call
#
seqfull=$0
-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/preamble
+_begin_fstest auto quick
+
+# Import common functions.
_supported_fs generic
# CVE-2014-8086
# Run aio-dio-fcntl-race - test aio write race with O_DIRECT toggle
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto aio rw stress
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Btrfs: make xattr replace operations atomic
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick attr metadata
+# Override the default cleanup function.
_cleanup()
{
kill $setter_pid
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
_require_scratch
_require_attrs
-rm -f $seqres.full
-
xattr_name="user.something"
xattr_value1="foobar"
xattr_value2="rabbit_hole"
# scsi-hd devices with discard support enabled (that means hole punching in the
# disk's image file is performed by the host).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto stress trim
+# Override the default cleanup function.
_cleanup()
{
rm -fr $tmp
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
# Keep allocating and deallocating 1G of data space with the goal of creating
# and deleting 1 block group constantly. The intention is to race with the
# fstrim loop below.
#
# Btrfs: fix directory inconsistency after fsync log replay
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest metadata auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# This issue was present in btrfs since the extrefs (extend references)
# feature was added (2012).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest metadata auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
# If the test filesystem is btrfs, make sure we create a filesystem with
# the extend references (extrefs) feature enabled (it's enabled by default
# in recent versions of btrfs-progs).
# This issue was present in btrfs since the extrefs (extend references)
# feature was added (2012).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest metadata auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
# If the test filesystem is btrfs, make sure we create a filesystem with
# the extend references (extrefs) feature enabled (it's enabled by default
# in recent versions of btrfs-progs).
# occurs for dirty pages within the extent but outside of the fallocated range,
# stale data exposure can occur.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown rw punch zero
-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
+# Import common functions.
. ./common/filter
. ./common/punch
# real QA test starts here
-rm -f $seqres.full
_crashtest()
{
#
# Test for NULL files problem
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown metadata log auto
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Test for NULL files problem
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown metadata log auto
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Test for NULL files problem
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown metadata log auto
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Test for NULL files problem
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown metadata log auto
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# Test for NULL files problem
# test inode size is on disk after fsync
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown metadata rw auto
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# Test for NULL files problem
# test inode size is on disk after sync
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown metadata rw auto
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# Test for NULL files problem
# test inode size is on disk after sync - expose log replay bug
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown metadata rw auto
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# Check out various mount/remount/unmount scenarious on a read-only blockdev.
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest shutdown mount auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
blockdev --setrw $SCRATCH_DEV
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# success, all done
echo "*** done"
-rm -f $seqres.full
status=0
# it and check that recovery runs to completion and everything can be
# successfully removed afterwards..
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown auto stress log metadata repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs generic
_require_scratch_shutdown
_require_command "$KILLALL_PROG" killall
-rm -f $seqres.full
-
_scratch_mkfs > $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_scratch_mount
# the goingdown ioctl is working and recovery of
# create transactions is working.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown log auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/log
# real QA test starts here
_supported_fs generic
-rm -f $seqres.full
rm -f $tmp.log
_require_scratch
#
# xfs_repair breaks acls
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest acl repair auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
# Initially keep this simple with just creates.
# In another qa test we can do more e.g. use fsstress.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown log v2log auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/log
# real QA test starts here
_supported_fs generic
-rm -f $seqres.full $tmp.*
_require_scratch
_require_scratch_shutdown
_require_logstate
# and so will use fsstress
# * also can interrupt metadata with godown
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown log v2log auto quota stress
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/log
. ./common/quota
# real QA test starts here
_supported_fs generic
-rm -f $seqres.full $tmp.*
_require_scratch
_require_scratch_shutdown
_require_logstate
#
# Btrfs: fix fsync data loss after adding hard link to inode
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest metadata auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
#
# Btrfs: fix fsync data loss after adding hard link to inode
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest metadata auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# type of extents. These tests are based on generic/255 test case.
# For the type of tests, check the description of _test_generic_punch
# in common/rc.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc punch insert
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
+# Import common functions.
# we need to include common/punch to get defination fo filter functions
-. ./common/rc
. ./common/filter
. ./common/punch
# Also test the mtime and ctime properties of the file change after punching
# holes with ranges that operate only on a single block of the file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest metadata auto quick punch log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_dm_target flakey
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# type of extents. These tests are based on generic/255 test case.
# For the type of tests, check the description of _test_generic_punch
# in common/rc.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc punch insert
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
+# Import common functions.
# we need to include common/punch to get defination fo filter functions
-. ./common/rc
. ./common/filter
. ./common/punch
# type of extents. These tests are based on generic/255 test case.
# For the type of tests, check the description of _test_generic_punch
# in common/rc.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc punch insert
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
+# Import common functions.
# we need to include common/punch to get defination fo filter functions
-. ./common/rc
. ./common/filter
. ./common/punch
# Exercises the getfattr/setfattr tools
# Derived from tests originally written by Andreas Gruenbacher for ext2
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest attr udf auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
getfattr()
{
_require_attrs $ATTR_MODES
-
for nsp in $ATTR_MODES; do
for inode in reg dir lnk dev/b dev/c dev/p; do
# type of extents. These tests are based on generic/255 test case.
# For the type of tests, check the description of _test_generic_punch
# in common/rc.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc punch insert
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
+# Import common functions.
# we need to include common/punch to get defination fo filter functions
-. ./common/rc
. ./common/filter
. ./common/punch
# is left with 50 extents and as many holes. Then call collapse range
# on the previously inserted ranges to test merge code of collapse
# range. Also check for data integrity and file system consistency.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc collapse insert
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_xfs_io_command "finsert"
_require_xfs_io_command "fcollapse"
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
_scratch_mount
# counts were incorrect after the fsync log was replayed and the hardlinks for
# new inodes were not logged.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest metadata auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
#
# Btrfs: remove deleted xattrs on fsync log replay
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick attr metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
. ./common/attr
_require_dm_target flakey
_require_attrs
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# - umount a path with too long name
# - lazy umount a symlink
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick mount
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_loop
_require_block_device $SCRATCH_DEV
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
# kernel should not hang nor oops when mounting fs to nonexistent mount point
# Test case to reproduce xfs_freeze hang under filsystem load.
# The fail case for this test is a hang on an xfs_freeze.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest other auto freeze stress
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
ITERATIONS=10
+# Override the default cleanup function.
_cleanup()
{
cd /
trap 0 1 2 3 15
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
echo "*** init FS"
-rm -f $seqres.full
_scratch_unmount >/dev/null 2>&1
echo "*** MKFS ***" >>$seqres.full
echo "" >>$seqres.full
#
# Test out writes with O_APPEND flag sets.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw udf auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
+_register_cleanup "rm -rf $tmp.*"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
_require_scratch
-rm -f $seqres.full
_scratch_unmount >/dev/null 2>&1
#
# fsstress incarnation testing extended attributes writes
#
-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
+. ./common/preamble
+_begin_fstest attr udf auto quick stress
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
# pre-allocated extent that ends beyond the file's size. Verify that if the fs
# is unmounted immediately after, the file's size and content are not lost.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick prealloc
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "falloc" "-k"
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
# fs: move falloc collapse range check into the filesystem methods
# If the race occurs, it will trigger a BUG_ON().
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto metadata stress collapse
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Btrfs: fix data loss in the fast fsync path
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest metadata auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
#
# fstest
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw udf auto
-here=`pwd`
-tmp=/tmp/$$
fstest_dir=$TEST_DIR/fstest
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
rm -rf $fstest_dir.* $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs generic
_require_test
-rm -f $seqres.full
-
_do_test()
{
_n="$1"
#
# fsx (non-AIO variant)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw udf auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $TEST_DIR/fsx.* $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_do_test()
echo "Params are for $param_type" >>$seqres.full
echo "Params: n = $numops1 N = $numops2 l = $filelen" >>$seqres.full
-rm -f $seqres.full
echo "brevity is wit..."
_check_test_fs
#
# Test blockdev reads in parallel with filesystem reads/writes
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1
+. ./common/preamble
+_begin_fstest metadata rw udf auto quick stress
_lets_get_pidst()
{
fi
}
+# Override the default cleanup function.
_cleanup()
{
echo "*** unmount"
_scratch_unmount 2>/dev/null
_lets_get_pidst
}
-trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
+_register_cleanup "_cleanup; rm -f $tmp.*"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
echo "*** init fs"
-rm -f $seqres.full
_scratch_unmount >/dev/null 2>&1
echo "*** MKFS ***" >>$seqres.full
echo "" >>$seqres.full
#
# Check use of ACLs (extended attributes) on a full filesystem
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1
+. ./common/preamble
+_begin_fstest acl attr auto enospc
# Something w/ enough data to fill 256M of fs...
filler=""
[ $(( $(du -h -m /usr | tail -1| cut -f1) * 2 )) -ge 256 ] && \
filler=/usr
+# Override the default cleanup function.
_cleanup()
{
cd /
echo "*** unmount"
_scratch_unmount 2>/dev/null
}
-trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
+_register_cleanup "_cleanup; rm -f $tmp.*"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
echo "*** create filesystem"
-rm -f $seqres.full
_scratch_unmount >/dev/null 2>&1
echo "*** MKFS ***" >>$seqres.full
echo "" >>$seqres.full
#
# Check renameat2 syscall with RENAME_WHITEOUT flag
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick metadata
-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
+# Import common functions.
. ./common/renameat2
_supported_fs generic
#
# Run the t_immutable test program for immutable/append-only files.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick ioctl metadata
-here=`pwd`
timmutable=$here/src/t_immutable
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
$timmutable -r $SCRATCH_MNT/$seq
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
#
# Verify that mtime is updated when writing to mmap-ed pages
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $testfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_test
echo "Silence is golden."
-rm -f $seqres.full
# pattern the file.
testfile=$TEST_DIR/mmap_mtime_testfile
#
# Test I/O error path by fully filling an dm snapshot.
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
done
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_command $LVM_PROG lvm
echo "Silence is golden"
-rm -f $seqres.full
vgname=vg_$seq
lvname=base_$seq
#
# Test quota handling on remount ro failure
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick quota
filter_project_quota_line()
{
grep -v "^project quota on"
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
_require_scratch
_require_quota
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount "-o usrquota,grpquota"
# dksc0d1s4: Process [fsstress] ran out of disk space
# dksc0d1s4: Process [fsstress] ran out of disk space
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1
+. ./common/preamble
+_begin_fstest rw auto enospc stress
+# Override the default cleanup function.
_cleanup()
{
echo "*** unmount"
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_no_large_scratch_dev
-rm -f $seqres.full
-
workout()
{
fsz=$1
# Regression test for commit:
# aae8a97 fs: Don't allow to create hardlink for deleted file
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto metadata quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
done
}
-rm -f $seqres.full
nr_cpu=`$here/src/feature -o`
echo "Silence is golden"
# This commit fixed the issue:
# 1494583 fix get_active_super()/umount() race
#
-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
+. ./common/preamble
+_begin_fstest auto freeze mount
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmsetup_remove $node
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_fail "setup dm device failed"
}
-rm -f $seqres.full
echo "Silence is golden"
size=$((256 * 1024 * 1024))
# This tests excercises the problem fixed in kernel with commit
# "ext4: Fix data corruption caused by unwritten and delayed extents"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto prealloc preallocrw quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# For NFSv3+, that test will wrongly succeed until kernel commit
# "Disable NFSv2 timestamp workaround for NFSv3+".
#
-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
+. ./common/preamble
+_begin_fstest perms auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# xfs_iaccess(ip,mode,cr)
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest perms auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_filter()
# Emulate the way Linux mount manipulates /etc/mtab to attempt to
# reproduce a possible bug in rename (see src/t_mtab.c).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest metadata auto
mtab_output=$TEST_DIR/mtab_output
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
addentries()
_require_test
_require_hardlinks
-rm -f $seqres.full
[ "X$TEST_DIR" = "X" ] && exit 1
cd $TEST_DIR
rm -fr test
#
# This test is motivated by a bug found in btrfs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest metadata auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
#
# fsx exercising direct IO -- sub-block sizes and concurrent buffered IO
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_test
_require_odirect
-rm -f $seqres.full
-
psize=`$here/src/feature -s`
bsize=`_min_dio_alignment $TEST_DEV`
# This also verifies that truncat'ing up past i_size doesn't remove the
# preallocated space.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc
-here=`pwd`
-tmp=/tmp/$$
status=0 # success 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
+# Import common functions.
. ./common/filter
. ./common/punch
#
# Test clearing of capabilities on write.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
+. ./common/preamble
+_begin_fstest attr cap auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # FAILure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
+# Override the default cleanup function.
_cleanup()
{
[ -n "$TEST_DIR" ] && rm -f $file
_require_command "$SETCAP_PROG" "setcap"
_require_command "$GETCAP_PROG" "getcap"
-rm -f $seqres.full
-
-echo "QA output created by $seq"
echo ""
file=$TEST_DIR/$seq.file
#
# Run the fiemap (file extent mapping) tester with preallocation enabled
#
-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/preamble
+_begin_fstest auto quick prealloc
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_scratch_mkfs > /dev/null 2>&1
_scratch_mount > /dev/null 2>&1
-rm -f $seqres.full
fiemapfile=$SCRATCH_MNT/$seq.fiemap
_require_test_program "fiemap-tester"
#
# Concurrent mixed I/O (buffer I/O, aiodio, mmap, splice) on the same files
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw stress
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# which is a fio built-in var.
echo 'bs=$pagesize' >> $fio_config
-rm -f $seqres.full
_require_fio $fio_config
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# past the isize but still in the same block. This particular problem
# has only been seen on systems with page_size > block_size.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto prealloc quick zero
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "fzero"
-rm -f $seqres.full
echo "Silence is golden"
# Use smaller scratch fs to shorten the test time
# - remove
# Basic testing.
#
-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
+. ./common/preamble
+_begin_fstest attr auto quick
file=$TEST_DIR/foo
+# Override the default cleanup function.
_cleanup()
{
rm -f $tmp.* $file
$SETFATTR_PROG "$@" |& _filter_test_dir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/attr
. ./common/filter
#
# This test is motivated by an issue found in btrfs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
MKFS_OPTIONS="$MKFS_OPTIONS -O no-holes"
fi
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# Test out ACLs.
#
#!/bin/bash
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
+. ./common/preamble
+_begin_fstest acl auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # FAILure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
+# Override the default cleanup function.
_cleanup()
{
cd /
_require_test
_require_runas
-rm -f $seqres.full
-
_acl_setup_ids
_require_acls
mkdir $seq.dir1
cd $seq.dir1
-echo "QA output created by $seq"
echo ""
echo "=== Test minimal ACE ==="
# Test whether a tarred directory structure can be untarred onto
# a UDF file system.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest udf auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
+# Override the default cleanup function.
_cleanup()
{
rm -f $tmp.* $TEMP_DIR/$TAR_FILE
POPULATED_DIR=$TEMP_DIR/populate_root
SIZE=10
-rm -f $seqres.full
-
# Clean up if file exist from prevous run
rm -rf $POPULATED_DIR
rm -f $TEMP_DIR/$TAR_FILE
#
# This test is motivated by a bug found in btrfs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
MKFS_OPTIONS="$MKFS_OPTIONS -O no-holes"
fi
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
#
# btrfs: Fix no_space on dd and rm loop < from zhaolei@cn.fujitsu.com >
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw
-tmp=/tmp/$$
-status=1
-trap "exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
_require_scratch
-rm -f $seqres.full
-
dev_size=$((1024 * 1024 * 1024)) # 1GB filesystem
_scratch_mkfs_sized $dev_size >>$seqres.full 2>&1
_scratch_mount
# attempting to set larger attribute values on a filesystem that is at or near
# ENOSPC.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick attr enospc
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
+_register_cleanup "_cleanup" 25
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15 25
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/attr
# real QA test starts here
_require_attrs
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
_consume_freesp()
{
file=$1
# links exist and the filesystem metadata (directory and file inodes) is in a
# consistent state.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# and breaks CAPP evaluation
# which pulls out an earlier mod
#
-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
+. ./common/preamble
+_begin_fstest acl auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
# real QA test starts here
-rm -f $seqres.full
-
_require_scratch
_require_acls
# inode, power fail and then mount the filesystem, the hard link we removed does
# not exists anymore and the filesystem metadata is in a consistent state.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# hard link we removed is not available anymore and all the filesystem metadata
# is in a consistent state.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# Test motivated by an XFS bug, and this commit fixed the issue
# xfs: return errors from partial I/O failures to files
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/scsi_debug
lvname=lv_$seq
vgname=vg_$seq
-rm -f $seqres.full
# _get_scsi_debug_dev returns a scsi debug device with 128M in size by default
SCSI_DEBUG_DEV=`_get_scsi_debug_dev 512 512 0 300`
# Test rename for various sizes of directories. This is motivated by a bug
# in XFS where directory entry file type was not updated properly on rename.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto metadata dir
-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
+# Import common functions.
# real QA test starts here
_supported_fs generic
_require_scratch
_require_symlinks
-rm -f $seqres.full
-
echo "Silence is golden"
filldir()
# - Modify the original file
# - Modify the reflinked file
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $testdir
}
-# get standard environment, filters and checks
-. common/rc
+# Import common functions.
. common/filter
. common/reflink
done
}
-rm -f $seqres.full
-
echo "Create the original file and reflink to copy1, copy2"
$XFS_IO_PROG -f -c 'pwrite -S 0x61 0 9000' $testdir1/original \
>> $seqres.full 2>&1
# - Modify the original files
# - Modify one of the copies
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $testdir
}
-# get standard environment, filters and checks
-. common/rc
+# Import common functions.
. common/filter
. common/reflink
done
}
-rm -f $seqres.full
-
mkdir $testdir1/original
mkdir $testdir1/original/subdir
#
# fsx (AIO variant, based on 075)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw aio auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $TEST_DIR/fsx.* $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_do_test()
echo "Params are for $param_type" >>$seqres.full
echo "Params: n = $numops1 N = $numops2 l = $filelen" >>$seqres.full
-rm -f $seqres.full
echo "brevity is wit..."
_check_test_fs
#
# aio-stress
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw aio auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $TEST_DIR/aio-stress.$$.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_do_test()
#
# Test races while extending past EOF via sub-block AIO writes
#
-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
+. ./common/preamble
+_begin_fstest rw aio auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $TEST_DIR/tst-aio-dio-eof-race
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs generic
# - Move both to a directory
# - Delete the original (moved) file, check that the copy still exists.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_test
-rm -f $seqres.full
-
testdir1=$TEST_DIR/test-$seq
rm -rf $testdir1
mkdir $testdir1
# - Reflink identical parts of two identical files
# - Check that we still have identical contents
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# real QA test starts here
_require_test_reflink
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# Attempt to cause filesystem corruption with serial fsstresses doing
# extended attributes writes - pv 940655
#
-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
+. ./common/preamble
+_begin_fstest attr auto quick
# seed and options for fsstress known to cause curruptions
seed=1122413794
ITERATIONS=10
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
_require_scratch
_require_attrs
-rm -f $seqres.full
_scratch_unmount >/dev/null 2>&1
echo "*** MKFS ***" >>$seqres.full
echo "" >>$seqres.full
# - Check that the non-linked ranges still do not match
# - Check that we end up with identical contents in the linked ranges
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# real QA test starts here
_require_test_reflink
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Reflink identical parts of all four files
# - Check that we end up with identical contents
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_reflink
_require_arbitrary_fileset_reflink
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
#
# Test noatime mount option.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest other atime auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# - Dedupe identical parts of two identical files
# - Check that still have identical contents
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone dedupe
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# real QA test starts here
_require_test_dedupe
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Fail to dedupe non-identical parts of two different files
# - Check that nothing changes in either file
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone dedupe
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# real QA test starts here
_require_test_dedupe
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# Make sure user cannot overwrite, append, delete or move a file created by
# root. Modified CXFSQA test 940960 and 940558.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest perms auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
+# Override the default cleanup function.
_cleanup()
{
cd $TEST_DIR
cd /
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# second is 1, ..., until last 8 bytes (1048568-1048575) contain 131071.
# patw preallocates the file and then writes the pattern, patr checks it
#
-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
+. ./common/preamble
+_begin_fstest pattern auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# ftruncate test, modified from CXFSQA tests cxfs_ftrunc and cxfs_trunc
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest other pnfs
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# tests various file permission options modified from CXFSQA test fs_perms
#
-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
+. ./common/preamble
+_begin_fstest perms auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# - fsx_10_std,
# - fsx_15_std_mmap
#
-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
+. ./common/preamble
+_begin_fstest rw auto
+# Override the default cleanup function.
_cleanup()
{
rm -f $tmp.output
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
FSX_FILE_SIZE=262144
#
# Test nosuid mount option modified from CXFSQA test mount_option_nosuid
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest perms auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# looptests created from CXFSQA test looptest
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto quick
-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
+# Import common functions.
. ./common/filter
echo_and_run()
# - unixfile_small_vector_async_rw
# - unixfile_small_vector_sync_rw
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest pattern auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# lock test created from CXFSQA test lockfile_simple
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest perms auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/locktest
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
# real QA test starts here
_supported_fs generic
_require_test
# xfs_io aligned vector rw created from CXFSQA test
# unixfile_vector_aligned_rw
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest pattern auto
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Concurrent I/O to same file to ensure no deadlocks
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# - Check that files 1-2 match, 3-4 don't match, and that nothing matches 3.
# - Check that the ends of 1-3 match, and 1-3 do not match the end of file4.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# real QA test starts here
_require_test_reflink
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
#
# Concurrent I/O to same file to ensure no deadlocks
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest metadata auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# - Check that files 1-2 match, and that 3-4 match.
# - Check that the ends of 1-2 and 3-4 match, and that 1-3 don't match.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone dedupe
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# real QA test starts here
_require_test_dedupe
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Check that we successfully avoid deduping with holes, unwritten
# extents, and non-matches; but actually dedupe real matches.
#
-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
+. ./common/preamble
+_begin_fstest auto clone dedupe
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_dedupe
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Write to the beginning, middle, and end
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_reflink
_require_cp_reflink
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
_compare_range $testdir/file2 18 $testdir/file3 18 17 \
|| echo "Start sections of 2-3 do not match"
-
_compare_range $testdir/file1 $((blksz * 16 - 17)) \
$testdir/file2 $((blksz * 16 - 17)) 82 \
|| echo "Middle sections of 1-2 do not match"
$testdir/file3 $((blksz * 48 - 108)) 100 \
|| echo "End sections of 2-3 do not match"
-
_compare_range $testdir/file1 $((blksz * 14)) \
$testdir/file2 $((blksz * 14)) $blksz \
|| echo "Untouched sections of 1-2 do not match"
# - Write to the beginning, middle, and end in direct-io mode
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_odirect
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
_compare_range $testdir/file2 $blksz $testdir/file3 $blksz 512 \
|| echo "Start sections of 2-3 do not match"
-
_compare_range $testdir/file1 $((blksz * 16 - 1024)) \
$testdir/file2 $((blksz * 16 - 1024)) 512 \
|| echo "Middle sections of 1-2 do not match"
$testdir/file3 $((blksz * 48 - 1024)) 512 \
|| echo "End sections of 2-3 do not match"
-
_compare_range $testdir/file1 $((blksz * 16)) \
$testdir/file2 $((blksz * 16)) 512 \
|| echo "Untouched sections of 1-2 do not match"
# - Write to the beginning, middle, and end
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_reflink
_require_cp_reflink
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
_compare_range $testdir/file2 18 $testdir/file3 18 17 \
|| echo "Start sections of 2-3 do not match"
-
_compare_range $testdir/file1 $((blksz * 16 - 17)) \
$testdir/file2 $((blksz * 16 - 17)) 82 \
|| echo "Middle sections of 1-2 do not match"
$testdir/file3 $((blksz * 48 - 120)) 100 \
|| echo "End sections of 2-3 do not match"
-
_compare_range $testdir/file1 $((blksz * 14)) \
$testdir/file2 $((blksz * 14)) $blksz \
|| echo "Untouched sections of 1-2 do not match"
#
# Test for xfs_io mmap read problem
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# - Rewrite all the reflink copies
# - Compare the contents of the original file
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_reflink
_require_cp_reflink
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Rewrite all the reflink copies w/ directio
# - Compare the contents of the original file
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_odirect
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Fallocate all the other sparse space.
# - Check that the reflinked areas are still there.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_xfs_io_command "truncate"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# of the three files, respectively
# - Check that the reflinked areas are still there.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone collapse
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_xfs_io_command "fcollapse"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# of the three files, respectively
# - Check that the reflinked areas are still there.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone punch
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# of the three files, respectively
# - Check that the reflinked areas are still there.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone insert
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "finsert"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Lengthen the other clone with truncate
# - Check that the reflinked areas are still there.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "truncate"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# of the three files, respectively
# - Check that the reflinked areas are still there.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone zero
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "fzero"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Create some reflink copies
# - Compare fs block usage to before
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_reflink
_require_cp_reflink
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Delete all copies of the file
# - Compare fs block usage to (2), (1), and (0)
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_reflink
_require_cp_reflink
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Punch all blocks of the copies
# - Compare fs block usage to (2), (1), and (0)
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone punch
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Truncate all blocks of the copies
# - Compare fs block usage to (2), (1), and (0)
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone collapse
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "fcollapse"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - CoW all the rest of the blocks of the copies
# - Compare fs block usage to (2), (1), and (0)
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_reflink
_require_cp_reflink
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# The main difference from 834 is that we use zero range, directio, and
# mmap to mix things up a bit.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone zero
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "fzero"
_require_odirect
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
#
# "funshare" refers to fallocate copy-on-writing the shared blocks
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "funshare"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
#
# Check that various invalid reflink scenarios are rejected.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
_require_scratch_reflink
_require_mknod
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Check that various invalid dedupe scenarios are rejected.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone dedupe
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
_require_scratch_dedupe
_require_mknod
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Check that we can't reflink immutable files
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
_require_chattr i
_require_test_reflink
-rm -f $seqres.full
-
echo "Format and mount"
testdir1="$TEST_DIR/test-$seq"
rm -rf $testdir1
#
# Check that we can't dedupe immutable files
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone dedupe
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
_require_chattr i
_require_test_dedupe
-rm -f $seqres.full
-
echo "Format and mount"
testdir1="$TEST_DIR/test-$seq"
rm -rf $testdir1
#
# Test for race between delete a file while rewriting its reflinked twin
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
#
# Test for race between dedupe and writing the dest file
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone dedupe
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
#
# Test for race between dedupe and writing the source file
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone dedupe
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# Test for races or FS corruption between reflink and buffered I/O reading the
# target file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# Test for races or FS corruption between reflink and direct I/O reading the
# target file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# Test for races or FS corruption when DIO writing to a file that's also
# the source of a reflink operation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# Test for races or FS corruption when writing to a file that's also
# the source of a reflink operation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# Test for races or FS corruption when writing to a file that's also
# the target of a reflink operation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
#
# Test for file size consistency with append followed by umount/mount
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-rm -f $seqres.full
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest rw metadata auto quick
_show_wrote_and_stat_only()
{
'
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# Test for races or FS corruption when DIO writing to a file that's also
# the target of a reflink operation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# Reflink a file, use up the rest of the space, then try to observe ENOSPC
# while copy-on-writing the file via the page cache.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/populate
. ./common/filter
. ./common/attr
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Reflink a file that uses more than half of the space, then try to observe
# ENOSPC while copy-on-writing the file via the page cache.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/populate
. ./common/filter
. ./common/attr
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Reflink a file, use up the rest of the space, then try to observe ENOSPC
# while copy-on-writing the file via mmap.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/populate
. ./common/filter
. ./common/attr
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Reflink a file, use up the rest of the space, then try to observe ENOSPC
# while copy-on-writing the file via direct-io.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/populate
. ./common/filter
. ./common/attr
_require_cp_reflink
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# See how well reflink handles reflinking the same block a million times.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
#
# See how well reflink handles reflinking a file with a million extents.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone punch
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
#
# This test is motivated by a bug found in btrfs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick prealloc metadata punch log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/punch
. ./common/dmflakey
_require_xfs_io_command "fiemap"
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
#
# Ensure that punch-hole doesn't clobber CoW.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone punch
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Perform an unaligned punch in the middle of the file.
# - Check that the reflinked areas are still there.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone punch
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Perform an unaligned zero-range in the middle of the file.
# - Check that the reflinked areas are still there.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone zero
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "fzero"
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Try to reflink "zero" bytes.
# - Check that the reflink happened.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_reflink
_require_cp_reflink
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - Try to dedupe "zero" bytes.
# - Check that the dedupe happened and nothing changed.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone dedupe
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# real QA test starts here
_require_test_dedupe
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# - directio CoW across the halfway mark.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# check mknod makes working nodes.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest metadata auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# - CoW across the halfway mark.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# real QA test starts here
_require_scratch_reflink
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - CoW across the halfway mark.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto clone punch
+# Override the default cleanup function.
_cleanup()
{
cd /
# rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "fpunch"
test $FSTYP = "btrfs" && _notrun "Can't fragment free space on btrfs."
-rm -f $seqres.full
-
_fragment_freesp()
{
file=$1
# - CoW across the halfway mark.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto clone punch
+# Override the default cleanup function.
_cleanup()
{
cd /
# rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
test $FSTYP = "btrfs" && _notrun "Can't fragment free space on btrfs."
_require_odirect
-rm -f $seqres.full
-
_fragment_freesp()
{
file=$1
# - directio CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - directio CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - ensure it is persistent after unmount
# - check updated time by correct amount
#
-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
+. ./common/preamble
+_begin_fstest atime auto
_access_time()
{
stat -c %X $1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
testfile=$TEST_DIR/testfile
rm -f $testfile
-rm -f $seqres.full
echo test >$testfile
time1=`_access_time $testfile | tee -a $seqres.full`
#
# Test permission checks in ->setattr
#
-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_files; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest metadata auto quick
+
+_register_cleanup "_cleanup_files"
tag="added by qa $seq"
#
sed -e "s,$test_root,test.root,g" -e "s,$test_user,test.user,g"
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# success, all done
echo "*** done"
-rm -f $seqres.full
status=0
# - directio CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - directio CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Test that aio+dio into holes does completion at the proper offsets
# See also https://bugzilla.redhat.com/show_bug.cgi?id=217098
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto aio quick
-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
+# Import common functions.
. ./common/filter
_supported_fs generic
echo "Silence is golden."
# real QA test starts here
-rm -f $seqres.full
rm -f "$TEST_DIR/aiodio_sparse*"
$AIO_TEST "$TEST_DIR/aiodio_sparse"
# - directio CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone punch
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone punch
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# See what happens if we dirty a lot of pages via CoW and immediately
# unlink the file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# See what happens if we CoW across not-block-aligned EOF.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# See what happens if we DIO CoW across not-block-aligned EOF.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Test out ENOSPC flushing on small filesystems.
#
-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
+. ./common/preamble
+_begin_fstest metadata rw auto
+# Override the default cleanup function.
_cleanup()
{
rm -f $tmp.*
sync
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
-rm -f $seqres.full
-
# get the block size first
_scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
. $tmp.mkfs
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# real QA test starts here
_require_scratch_reflink
-rm -f $seqres.full
-
pagesz=$(getconf PAGE_SIZE)
blksz=$((pagesz / 4))
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_odirect
-rm -f $seqres.full
-
pagesz=$(getconf PAGE_SIZE)
blksz=$((pagesz / 4))
#
# Run aio-dio-extend-stat - test race in dio aio completion
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto aio quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Run aio-dio-invalidate-failure - test race in read cache invalidation
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto aio
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
_require_test
-rm -f $seqres.full
-
_run_aiodio aio-dio-invalidate-failure
_check_dmesg _filter_aiodio_dmesg
#
# Run aio-dio-invalidate-readahead - test sync DIO invalidation of readahead
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto aio
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Run aio-dio-subblock-eof-read - test AIO read of last block of DIO file
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto aio quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Run aio-free-ring-with-bogus-nr-pages - test aio_setup_ring with bad nr_pages
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto aio quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# Run aio-io-setup-with-nonwritable-context-pointer -
# Test what happens when a non-writable context pointer is passed to io_setup
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto aio quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Based on xfs-specific test 072
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto prealloc quick enospc
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-here=`pwd`
tmp=$TEST_DIR/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
[ -n "$XFS_IO_PROG" ] || _notrun "xfs_io executable not found"
-rm -f $seqres.full
-
_require_test
_require_xfs_io_command "falloc"
#
# Basic unwritten extent sanity checks
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto prealloc quick
+# Override the default cleanup function.
_cleanup()
{
rm -f $TEST_DIR/ouch*
rm -f $tmp.*
}
-here=`pwd`
tmp=$TEST_DIR/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
[ -n "$XFS_IO_PROG" ] || _notrun "xfs_io executable not found"
-rm -f $seqres.full
rm -f $TEST_DIR/ouch*
_require_xfs_io_command "falloc"
#
# Based on the testcase in http://bugzilla.kernel.org/show_bug.cgi?id=2645
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto metadata quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $testfile
}
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# success, all done
echo "*** done"
-rm -f $seqres.full
status=0
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
pagesz=$(getconf PAGE_SIZE)
blksz=$((pagesz / 4))
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
pagesz=$(getconf PAGE_SIZE)
blksz=$((pagesz / 4))
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
pagesz=$(getconf PAGE_SIZE)
blksz=$((pagesz / 4))
#
# Simple quota accounting test for direct/buffered/mmap IO.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
}
# real QA test starts here
-rm -f $seqres.full
_scratch_unmount 2>/dev/null
_scratch_mkfs >> $seqres.full 2>&1
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
pagesz=$(getconf PAGE_SIZE)
blksz=$((pagesz / 4))
#
# Based on a bug report and testcase from Eric Blake <ebb9@byu.net>.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto metadata quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs generic
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
pagesz=$(getconf PAGE_SIZE)
blksz=$((pagesz / 4))
#
# File alignment tests
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
BLOCKSIZE=4096
for SUNIT_K in 8 16 32 64 128; do
# focus, the test can to run on any filesystem to exercise ENOSPC
# behaviour.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto
+# Override the default cleanup function.
_cleanup()
{
rm -f $tmp.*
rm -f $SCRATCH_MNT/testfile.*
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Run the fiemap (file extent mapping) tester
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_scratch_mkfs > /dev/null 2>&1
_scratch_mount > /dev/null 2>&1
-rm -f $seqres.full
fiemapfile=$SCRATCH_MNT/$seq.fiemap
fiemaplog=$SCRATCH_MNT/$seq.log
#
# Test for prealloc space leaks by rewriting the same file in a loop
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto enospc
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
_supported_fs generic
_require_scratch
_require_odirect
# real QA test starts here
-rm -f $seqres.full
_scratch_unmount 2>/dev/null
echo "--> mkfs 256m filesystem"
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
pagesz=$(getconf PAGE_SIZE)
blksz=$((pagesz / 4))
#
# Check if fallocate respects RLIMIT_FSIZE
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto prealloc quick
+# Override the default cleanup function.
_cleanup()
{
cd /
ulimit -c $ulimit_c
}
-here=`pwd`
tmp=$TEST_DIR/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15 25
+_register_cleanup "_cleanup" 25
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
# generic, but xfs_io's fallocate must work
[ -n "$XFS_IO_PROG" ] || _notrun "xfs_io executable not found"
-rm -f $seqres.full
-
# Sanity check to see if fallocate works
_require_xfs_io_command "falloc"
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
pagesz=$(getconf PAGE_SIZE)
blksz=$((pagesz / 4))
;;
esac
-
-
case $b4 in
"regular")
_pwrite_byte 0x61 $((blksz * 3)) $blksz $dir/file2 >> $seqres.full
#
# Simple quota enforcement test.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
}
# real QA test starts here
-rm -f $seqres.full
grace=2
# Run fsx with quotas enabled and verify accounted quotas in the end
#
# Derived from test 127
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
_require_quota
_require_user
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount "-o usrquota,grpquota"
chmod 777 $SCRATCH_MNT
# Run fsstress with quotas enabled and verify accounted quotas in the end
#
# Derived from test 231
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota stress
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
# quotas in the end
#
# Derived from test 231
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota stress
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
#
# Stress setquota and setinfo handling.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
_require_quota
# real QA test starts here
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount "-o usrquota,grpquota"
#
# Test whether quota gets properly reenabled after remount read-write
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
}
# real QA test starts here
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount "-o usrquota,grpquota"
# Check ctime updated or not if file linked
# See also http://marc.info/?l=linux-btrfs&m=127434439020230&w=2
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick metadata
+# Override the default cleanup function.
_cleanup()
{
rm -f $TEST_DIR/ouch*
}
-here=`pwd`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs generic
# Check user B can setfacl a file which belongs to user A
# See also http://marc.info/?l=linux-btrfs&m=127434445620298&w=2
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick acl
-here=`pwd`
-tmp=/tmp/$$
-status=1 # FAILure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
+# Override the default cleanup function.
_cleanup()
{
cd /
_require_test
_require_runas
-rm -f $seqres.full
-
_acl_setup_ids
_require_acls
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
pagesz=$(getconf PAGE_SIZE)
blksz=$((pagesz / 4))
;;
esac
-
-
case $b4 in
"regular")
_pwrite_byte 0x61 $((blksz * 3)) $blksz $dir/file2 >> $seqres.full
# Read from a sparse file immedialy after filling a hole to test for races
# in unwritten extent conversion.
#
-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
+. ./common/preamble
+_begin_fstest auto aio rw
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $TEST_DIR/tst-aio-dio-sparse-unwritten
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs generic
# This test need only be run in the case where the logical block size
# of the device can be smaller than the file system block size.
#
-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/preamble
+_begin_fstest auto aio quick rw
+
+# Import common functions.
. ./common/filter
_supported_fs generic
echo "Silence is golden."
# real QA test starts here
-rm -f $seqres.full
rm -f $TEST_DIR/aiodio_sparse
# This corrupted ext4 inode bitmaps due to races at one point
#
#
-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/preamble
+_begin_fstest auto
+
+# Import common functions.
. ./common/filter
_supported_fs generic
echo "Silence is golden."
# real QA test starts here
-rm -f $seqres.full
rm -rf $TEST_DIR/dbench
mkdir $TEST_DIR/dbench
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-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
+. ./common/preamble
+_begin_fstest auto clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-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
+. ./common/preamble
+_begin_fstest auto clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_odirect
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Designed to use the new Q_GETNEXTQUOTA quotactl
#
-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
+. ./common/preamble
+_begin_fstest auto quick quota
+# Override the default cleanup function.
_cleanup()
{
cat $tmp.IDs >> $seqres.full
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
#
# Based on a bug report and testcase from Vlado Plaga <rechner@vlado-do.de>
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick dir
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
dir=$TEST_DIR/test-mv
+# Override the default cleanup function.
_cleanup()
{
rm -rf $dir
sed -e "s,Directory not empty,File exists,g"
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
mkdir $dir
# Based on a bug report and testcase from
# Marius Tolzmann <tolzmann@molgen.mpg.de>
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
file=$TEST_DIR/mmap-writev
+# Override the default cleanup function.
_cleanup()
{
rm -rf $file
rm -rf $file.NEW
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
echo -n "cccccccccc" > $file
$here/src/t_mmap_writev $file $file.NEW
od -t x2 $file.NEW
#
# Test for race between direct I/O and mmap
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Test for pwrite hang problem when writing from mmaped buffer of the same page
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $TESTFILE
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# simple splice(2) test.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $SRC $DST
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
SRC=$TEST_DIR/$seq.src
DST=$TEST_DIR/$seq.dst
-rm -f $seqres.full
$XFS_IO_PROG -f -c "pwrite -S 0xa5a55a5a 0 32768k" -c fsync $SRC >> $seqres.full 2>&1
[ $? -ne 0 ] && _fail "xfs_io pwrite failed"
# Create an unwritten extent, set up dm-error, try a DIO write, then
# make sure we can't read back old disk contents.
#
-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
+. ./common/preamble
+_begin_fstest auto quick prealloc rw eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmerror
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
# Disable the scratch rt device to avoid test failures relating to the rt
# bitmap consuming all the free space in our small data device.
unset SCRATCH_RTDEV
# does not change after copied into SCRATCH_MNT test if FITRIM implementation
# corrupts the filesystem (data/metadata).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest ioctl trim
-here=`pwd`
tmp=`mktemp -d`
-status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 3
trap "_destroy; exit \$status" 2 15
chpid=0
mypid=$$
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_scratch_mount
_require_batched_discard $SCRATCH_MNT
+# Override the default cleanup function.
_cleanup()
{
rm -rf $tmp
# Create an unwritten extent, set up dm-error, try an AIO DIO write, then
# make sure we can't read back old disk contents.
#
-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
+. ./common/preamble
+_begin_fstest auto quick prealloc rw eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmerror
_require_aiodio "aiocp"
AIO_TEST="$here/src/aio-dio-regress/aiocp"
-rm -f $seqres.full
-
# Disable the scratch rt device to avoid test failures relating to the rt
# bitmap consuming all the free space in our small data device.
unset SCRATCH_RTDEV
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "truncate"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone punch
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Test Generic fallocate hole punching
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc punch
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/punch
#
# Test Full File System Hole Punching
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick punch
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/populate
. ./common/filter
. ./common/punch
# Check that no duplicate d_off values are returned and that those
# values are seekable. Most work is done by the C program here.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest dir auto quick
+# Override the default cleanup function.
_cleanup()
{
rm -rf $TEST_DIR/ttt
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# success, all done
echo "*** done"
-rm -f $seqres.full
status=0
# On 64-bit, ext2/3/4 was sign-extending when read from disk
# See also commit 4d7bf11d649c72621ca31b8ea12b9c94af380e63
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick bigtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs generic
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone zero
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "fzero"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Purpose of this test is to check FITRIM argument handling to make sure
# that the argument processing is right and that it does not overflow.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick trim
-here=`pwd`
-tmp=/tmp/$$
status=0
-trap "exit \$status" 0 1 2 3 15
chpid=0
mypid=$$
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone collapse
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "fcollapse"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone insert
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "finsert"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# fsx exercising direct IO vs sub-block buffered I/O
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_test
_require_odirect
-rm -f $seqres.full
-
psize=`$here/src/feature -s`
bsize=`_min_dio_alignment $TEST_DEV`
# This test is dependent on the system page size, so we cannot use md5 in
# the golden output; we can only compare to a check file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "funshare"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Test CoW behavior when the write temporarily fails.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_cp_reflink
_require_dm_target error
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
#
# Test CoW behavior when the write permanently fails.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_cp_reflink
_require_dm_target error
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
#
# Test CoW behavior when the write temporarily fails and we unmount.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_cp_reflink
_require_dm_target error
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
# Test CoW behavior when the write temporarily fails but the userspace
# program writes again.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_cp_reflink
_require_dm_target error
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
#
# Run fsstress and ENSPC hitters in parallel, check fs consistency an the end
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw prealloc ioctl enospc stress
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# Disable all sync operations to get higher load
FSSTRESS_AVOID="$FSSTRESS_AVOID -ffsync=0 -fsync=0 -ffdatasync=0"
_supported_fs generic
_require_scratch
-rm -f $seqres.full
_scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1
_scratch_mount
# Run fsstress and ENSPC hitters in parallel, check quota and
# fs consistency an the end
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota rw prealloc ioctl enospc stress
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
_require_command "$KILLALL_PROG" killall
_require_command "$SETCAP_PROG" setcap
-rm -f $seqres.full
_scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1
_scratch_mount "-o usrquota,grpquota"
chmod 777 $SCRATCH_MNT
#
# Test DIO CoW behavior when the write temporarily fails.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_dm_target error
_require_odirect
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
#
# Test DIO CoW behavior when the write permanently fails.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_dm_target error
_require_odirect
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
#
#creator
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount
}
-. ./common/rc
. ./common/filter
threads=50
echo "start the workload"
echo "------------------------------"
-rm -f $seqres.full
-
_scratch_unmount 2>/dev/null
_scratch_mkfs_sized $((2 * 1024 * 1024 * 1024)) >>$seqres.full 2>&1
_scratch_mount
#
#creator
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw prealloc enospc
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount
}
-. ./common/rc
. ./common/filter
# real QA test starts here
echo "preallocation test"
echo "------------------------------"
-rm -f $seqres.full
-
_scratch_unmount 2>/dev/null
_scratch_mkfs_sized $((2 * 1024 * 1024 * 1024)) >>$seqres.full 2>&1
_scratch_mount
#
#creator
-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
+. ./common/preamble
+_begin_fstest auto rw enospc
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount
}
-. ./common/rc
. ./common/filter
# real QA test starts here
echo "write until ENOSPC test"
echo "------------------------------"
-rm -f $seqres.full
-
_scratch_unmount 2>/dev/null
_scratch_mkfs_sized $((2 * 1024 * 1024 * 1024)) >>$seqres.full 2>&1
_scratch_mount
#
# Test DIO CoW behavior when the write temporarily fails and we unmount.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_dm_target error
_require_odirect
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
#
# Check if ctime update caused by chattr is written to disk
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto ioctl quick metadata
+# Override the default cleanup function.
_cleanup()
{
rm -f $SCRATCH_MNT/tmp*
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
# Test DIO CoW behavior when the write temporarily fails but the userspace
# program writes again.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_dm_target error
_require_odirect
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
#
# Test mmap CoW behavior when the write temporarily fails.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_cp_reflink
_require_dm_target error
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
# Test quota vs. suspend/freeze deadlock,
# dcdbed85 quota: Fix deadlock with suspend and quotas
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota freeze
-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
+# Import common functions.
. ./common/filter
. ./common/quota
# Modify as appropriate.
_supported_fs generic
-rm -f $seqres.full
-
_scratch_unmount 2>/dev/null
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount "-o usrquota,grpquota"
#
# Test mmap CoW behavior when the write permanently fails.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_cp_reflink
_require_dm_target error
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
#
# Test mmap CoW behavior when the write temporarily fails and we unmount.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_cp_reflink
_require_dm_target error
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
# Test mmap CoW behavior when the write temporarily fails but the userspace
# program writes again.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_cp_reflink
_require_dm_target error
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Improved by Jeff.liu@oracle.com
# Creater: josef@redhat.com
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw seek
-here=`pwd`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs generic
_require_test_program "seek_sanity_test"
+# Override the default cleanup function.
_cleanup()
{
eval "rm -f $BASE_TEST_FILE.*"
#
# SEEK_DATA/SEEK_HOLE copy tests.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick other seek
-here=`pwd`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_test_program "seek_copy_test"
+# Override the default cleanup function.
_cleanup()
{
rm -f $src $dest
cmp $src $dest || _fail "TEST04: file bytes check failed"
}
-rm -f $seqres.full
test01
test02
test03
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# This check the FITRIM argument handling in the corner case where length is
# smaller than block size or zero.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick ioctl trim
status=0
-trap "exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Tests for EEXIST (not EROFS) for inode creations, if
# we ask to create an already-existing entity on an RO filesystem
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_symlinks
_require_mknod
-rm -f $seqres.full
_scratch_mkfs > $seqres.full 2>&1 || _fail "Could not mkfs scratch device"
THIS_TEST_DIR=$SCRATCH_MNT/$seq.test
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - Create two reflinked files a byte longer than a block.
# - Rewrite the whole file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# See how well reflink handles ^C in the middle of a slow reflink.
#
-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
+. ./common/preamble
+_begin_fstest auto clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $TEST_DIR/before $TEST_DIR/after
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
test $FSTYP == "nfs" && _notrun "NFS can't interrupt clone operations"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# See how well reflink handles SIGKILL in the middle of a slow reflink.
#
-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
+. ./common/preamble
+_begin_fstest auto clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $TEST_DIR/before $TEST_DIR/after
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
test $FSTYP == "nfs" && _notrun "NFS can't interrupt clone operations"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Run random AIO/DIO activity and fallocate/truncate simultaneously
# Test will operate on huge sparsed files so ENOSPC is expected.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto aio enospc rw stress
-here=`pwd`
-tmp=/tmp/$$
fio_config=$tmp.fio
fio_out=$tmp.fio.out
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
filename=buffered-aio-verifier
EOF
-rm -f $seqres.full
-
_require_fio $fio_config
_require_xfs_io_command "falloc"
# Run random AIO/DIO activity and fallocate/punch_hole simultaneously
# Test will operate on huge sparsed file so ENOSPC is expected.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto aio enospc preallocrw stress punch
-here=`pwd`
-tmp=/tmp/$$
fio_config=$tmp.fio
fio_out=$tmp.fio.out
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_xfs_io_command "falloc"
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
NUM_JOBS=$((4*LOAD_FACTOR))
BLK_DEV_SIZE=`blockdev --getsz $SCRATCH_DEV`
if [ $((BLK_DEV_SIZE)) -gt 1048576 ]; then
# - Buffered write to random offsets to scatter CoW reservations.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "fiemap"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - Directio write to random offsets to scatter CoW reservations.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "fiemap"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Check that high-offset reflinks work.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
_require_test_reflink
_require_cp_reflink
-rm -f $seqres.full
-
echo "Format and mount"
testdir=$TEST_DIR/test-$seq
mkdir $testdir
#
# Check that high-offset dedupes work.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone dedupe
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
_require_test_dedupe
_require_cp_reflink
-rm -f $seqres.full
-
echo "Format and mount"
testdir=$TEST_DIR/test-$seq
mkdir $testdir
# Ensure that quota charges us for reflinking a file and that we're not
# charged for buffered copy on write.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/quota
_require_nobody
_require_user
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
#
# Test RW open of a device on a RO fs
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw
+# Override the default cleanup function.
_cleanup()
{
umount $BINDFILE
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
BINDFILE=$SCRATCH_MNT/bindfile
TARGET=$TEST_DIR/target
-rm -f $seqres.full
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount
#
# Based on test 277
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick acl
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $testfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
# Regression test for commit:
# f17722f ext4: Fix max file size and logical block counting of extent format file
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $testfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
testfile=$TEST_DIR/testfile.$seq
_supported_fs generic
_require_test
-rm -f $seqres.full
echo "Silence is golden"
block_size=`_get_block_size $TEST_DIR`
# Regression test for commit:
# 0b23076 ext3: fix update of mtime and ctime on rename
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $TEST_DIR/testfile.$seq
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# http://marc.info/?l=linux-kernel&m=136123703211869&w=2
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto
+# Override the default cleanup function.
_cleanup()
{
rm -rf $TEST_DIR/tmp
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# tests that were handcrafted to reproduce bugs in btrfs, so it's also a
# regression test of sorts.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_test_program "fsync-tester"
-rm -f $seqres.full
SEED=1
testfile=$SCRATCH_MNT/$seq.fsync
# Regression test for commit
# 29ae07b ext4: Fix overflow caused by missing cast in ext4_fallocate()
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc enospc
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# 5G in byte
fssize=$((2**30 * 5))
-rm -f $seqres.full
_scratch_mkfs_sized $fssize >>$seqres.full 2>&1
_scratch_mount >>$seqres.full 2>&1
# Regression test for commit:
# 3972f26 btrfs: update timestamps on truncate()
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $testfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Test SGID inheritance on subdirectories
#
-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/preamble
+_begin_fstest auto quick
+
+# Import common functions.
. ./common/filter
# real QA test starts here
# to the old smaller size. Before Linux 3.10, Btrfs/OCFS2 are test
# failed in this case.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw prealloc
-here=`pwd`
-tmp=/tmp/$$
status=0 # success 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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_test
_require_xfs_io_command "falloc" "-k"
-rm -f $seqres.full
-
echo "Slience is golden"
# Check the current avaliable disk space on $TEST_DIR.
#
# Test Generic fallocate hole punching w/o unwritten extent
#
-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/preamble
+_begin_fstest auto quick punch
+
+# Import common functions.
. ./common/filter
. ./common/punch
# uid/gid from both inside the userns and from init_user_ns to show
# that the correct uid was flushed and brought back from disk.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto metadata quick
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount >/dev/null 2>&1
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
[ -x $lstat64 ] || _notrun "$lstat64 executable not found"
-rm -f $seqres.full
-
_require_scratch
_require_user
_require_ugid_map
# userns and from init_user_ns to show that the correct uid/gid in
# the ACL was flushed and brought back from disk.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest acl attr auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount >/dev/null 2>&1
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
_supported_fs generic
# only Linux supports user namespace
-rm -f $seqres.full
-
_require_scratch
_acl_setup_ids
_require_acls
#
# https://patchwork.kernel.org/patch/3046931/
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest acl auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # FAILure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
_require_acls
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
#
# Based on generic/273
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
echo "Silence is golden"
-rm -f $seqres.full
-
_scratch_mkfs_sized $fs_size >>$seqres.full 2>&1
_scratch_mount >>$seqres.full 2>&1
#
# Runs various dir fsync tests to cover fsync'ing directory corner cases.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch_nocheck
_require_dm_target flakey
-rm -f $seqres.full
-
_clean_working_dir()
{
_mount_flakey
#
# Runs various rename fsync tests to cover some rename fsync corner cases.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch_nocheck
_require_dm_target flakey
-rm -f $seqres.full
-
_clean_working_dir()
{
_mount_flakey
# last reference to an ioctx be held by the IO (instead of the
# process) would cause problems (hung system, crashes).
-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/preamble
+_begin_fstest auto aio stress
+
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Sanity check for defrag utility.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto fsr quick defrag
PIDS=""
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/defrag
_require_defrag
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
_workout()
{
nr=$1
--min_after 1 $SCRATCH_MNT/test.$nr
}
-
# Actual testing starting from here
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
#
# Btrfs: fix fsync data loss after a ranged fsync
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick data log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# Ensure that quota charges us for reflinking a file and that we're not
# charged for directio copy on write.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/quota
_require_odirect
_require_user
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
#
# Ensure that we can't go over the hard block limit when reflinking.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/quota
_require_nobody
_require_user
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
#
# Ensure that we can't go over the hard block limit when CoWing a file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/quota
_require_odirect
_require_user
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
#
# Test AIO DIO CoW behavior when the write temporarily fails.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_dm_target error
_require_aiodio "aiocp"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
#
# Test AIO DIO CoW behavior.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $TEST_DIR/moo
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_aiodio "aiocp"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Test AIO CoW behavior when the write temporarily fails.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_aiodio "aiocp"
AIO_TEST="$here/src/aio-dio-regress/aiocp"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
#
# Test AIO CoW behavior.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $TEST_DIR/moo
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_aiodio "aiocp"
AIO_TEST="$here/src/aio-dio-regress/aiocp"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Test for races or FS corruption when trying to hit ENOSPC while DIO writing
# to a file that's also the source of a reflink operation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# Test for races or FS corruption when trying to hit ENOSPC while writing
# to a file that's also the source of a reflink operation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# of the old directory, power fail and remount the filesystem, the file is not
# lost and it's located at the destination directory.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# file F2 from directory B into directory C, fsync inode F1, power fail and
# remount the filesystem, file F2 exists and is located only in directory C.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# Test that the filesystem's implementation of the listxattrs system call lists
# all the xattrs an inode has.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick attr metadata
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
_require_scratch
_require_attrs
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# Motivated by an ext4 bug that crashes kernel on error path when trying to
# update atime.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmerror
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_nocheck # fs went down with a dirty log, don't check it
# commit f5ea110 ("xfs: add CRCs to dir2/da node blocks") left the
# directory with incorrect hash ordering.
#
-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/preamble
+_begin_fstest auto dir
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_test_program "dirhash_collide"
-rm -f $seqres.full
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
#
# Test mmap writing races from racing threads
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto
# get standard environment and checks
-. ./common/rc
# real QA test starts here
_supported_fs generic
_require_scratch
_require_test_program "holetest"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# directory, fsync the new inode, power fail and mount the filesystem, we see
# our first directory with the new name and no files under it were lost.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# power fail and mount the filesystem, we do not lose the first file and that
# file has the name it was renamed to.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# file F, power fail and mount the filesystem, the directory/file B is located
# only at directory A and both links for file F exist.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# Test races between mmap from racing threads when pages are prefaulted,
# Test races between mmap and buffered writes when pages are prefaulted.
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto
# get standard environment and checks
-. ./common/rc
# real QA test starts here
_supported_fs generic
_require_scratch
_require_test_program "holetest"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
#
# Test races between mmap from racing processes with and without prefaulting.
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto
# get standard environment and checks
-. ./common/rc
# real QA test starts here
_supported_fs generic
_require_scratch
_require_test_program "holetest"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
#
# Test races between mmap and normal writes from racing threads
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick rw
# get standard environment and checks
-. ./common/rc
# real QA test starts here
_supported_fs generic
_require_scratch
_require_test_program "holetest"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# Test very basic thin device usage, exhaustion, and growth
#
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw thin
BACKING_SIZE=$((500 * 1024 * 1024 / 512)) # 500M
VIRTUAL_SIZE=$((10 * $BACKING_SIZE)) # 5000M
GROW_SIZE=$((100 * 1024 * 1024 / 512)) # 100M
+# Override the default cleanup function.
_cleanup()
{
_dmthin_cleanup
done
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dmthin
_supported_fs generic
# content must match what we specified when we created it (must not be empty
# or point to something else).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_symlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# Test fallocate(ZERO_RANGE) on a block device, which should be able to
# WRITE SAME (or equivalent) the range.
#
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest blockdev rw zero
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/scsi_debug
# Test fallocate(PUNCH_HOLE) on a block device, which should be able to
# zero-TRIM (or equivalent) the range.
#
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest blockdev rw punch
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/scsi_debug
# with the logicalsector size, and make sure the fallbacks work for
# devices that don't support write_same or discard.
#
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest blockdev rw punch collapse insert zero
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/scsi_debug
_require_xfs_io_command "fzero"
_require_xfs_io_command "fpunch"
-
echo "Create and format"
dev=$(_get_scsi_debug_dev 4096 4096 0 4 "lbpws=1 lbpws10=1")
_pwrite_byte 0x62 0 4m $dev >> $seqres.full
# without problem and return correct SHARED flag.
# Which btrfs will soft lock up and return wrong shared flag.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/punch
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# already committed to disk, but not delayed extent tree modification.
# This caused SHARED flag only occurs after sync.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/punch
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Test races between private file mapping faults from racing processes or
# threads
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto
# get standard environment and checks
-. ./common/rc
# real QA test starts here
_supported_fs generic
_require_scratch
_require_test_program "holetest"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
#
# Test clear of suid/sgid on direct write.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
#
# Check that we can't reflink a swapfile.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone swap
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
#
# Check that we can't swapon a reflinked file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone swap
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# by 32 files. At block 1, change one of the owners. At block 2,
# change 2 of the owners, and so on.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# we handle the case where a refcount extent record doesn't coincide
# exactly with the block mapping records.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
#
# Test symlink to very long path, check symlink file contains correct path.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick metadata
-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
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
# the issue.
# 5cb13dc cancel the setfilesize transation when io error happen
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
$UMOUNT_PROG $fs_mnt
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch
#
# RichACL apply-masks test
#
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+. ./common/preamble
+_begin_fstest auto quick richacl
+
+# Import common functions.
# real QA test starts here
#
# RichACL auto-inheritance test
#
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+. ./common/preamble
+_begin_fstest auto quick richacl
+
+# Import common functions.
# real QA test starts here
#
# RichACL basic test
#
-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/attr
+. ./common/preamble
+_begin_fstest auto quick richacl
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/attr
# real QA test starts here
#
# RichACL chmod test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick richacl
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
# real QA test starts here
#
# RichACL chown test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick richacl
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
# real QA test starts here
#
# RichACL create test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick richacl
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
# real QA test starts here
#
# RichACL ctime test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick richacl
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
# real QA test starts here
#
# RichACL delete test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick richacl
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
# real QA test starts here
#
# RichACL write-vs-append test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick richacl
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
# real QA test starts here
# for these operations don't exceed whole fs free data space, to see whether
# we will get any unexpected ENOSPC error.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick enospc prealloc
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs generic
_require_scratch
#
# Check that bmap/fiemap accurately report shared extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
#
# Check that cross-mountpoint reflink doesn't work.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
#
# Check that cross-mountpoint dedupe doesn't work.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone dedupe
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# Check if SGID is cleared upon chmod / setfacl when the owner is not in the
# owning group.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick acl
-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
+# Import common functions.
. ./common/filter
. ./common/attr
# against the file we renamed works correctly and after a power failure both
# files exists.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
#
# Test listxattr syscall behaviour with different buffer sizes.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest attr auto quick metadata
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
listxattr="$here/src/listxattr"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
#
# 51f7e52 ovl: share inode for hard link
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick metadata
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
# Check behavior of chown with both user and group quota enabled,
# and changing both user and group together via chown(2).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest quota auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
+# Override the default cleanup function.
_cleanup()
{
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs generic
# Without the fix, this will create an ASSERT failure in debug kernels
# and crash a non-debug kernel.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest quota auto quick
-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
+# Import common functions.
. ./common/filter
. ./common/quota
# For example, create a 'limit' for a user or group named
# '12345678-abcd', then query this user and group.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch
#
# [PATCH] xfs: Split default quota limits by quota type V4
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch
#
# Test xfs_quota when project names beginning with digits.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
qa_user=""
-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
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch
# test to reproduce PV951636:
# project quotas not updated if a file is mv'd into that directory
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest quota auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs generic
#
# Based on a report and testcase from Arkadiusz Miskiewicz <arekm@maven.pl>
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest quota auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
# success, all done
echo "*** done"
-rm -f $seqres.full
status=0
#
# SGI PV 1015651
#
-seq=$(basename $0)
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-here=$(pwd)
-
-rm -f $seqres.full
-
-tmp=/tmp/$$
my_projects=$tmp.projects
my_projid=$tmp.projid
proj_name=test_project
qlimit_meg=500 # 500M limit imposed = 500 * 1024 * 1024 bytes
-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
+# Import common functions.
. ./common/filter
. ./common/quota
# Create a heavily reflinked file, then check whether we can truncate
# it correctly.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs generic
_require_scratch_reflink
# Ensure that log recovery does not recover stale modifications and cause
# spurious corruption reports and/or mount failures.
#
-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
+. ./common/preamble
+_begin_fstest shutdown auto log metadata
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount > /dev/null 2>&1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# Modify as appropriate.
_supported_fs generic
_require_scratch_shutdown
_require_command "$KILLALL_PROG" "killall"
-rm -f $seqres.full
-
echo "Silence is golden."
_scratch_mkfs >> $seqres.full 2>&1
# Test if O_TMPFILE files inherit POSIX Default ACLs when they are linked into
# the namespace.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick acl
-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
+# Import common functions.
. ./common/attr
. ./common/filter
_require_xfs_io_command "flink"
_require_acls
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
testdir="${TEST_DIR}/d.$seq"
testfile="${testdir}/tst-tmpfile-flink"
# Multi-threads freeze/unfreeze testing. This's a stress test case,
# it won't do functional check.
#
-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
+. ./common/preamble
+_begin_fstest auto freeze stress
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
echo "Silence is golden"
# Motivated by a bug in Btrfs' direct I/O get_block function which would lead
# to spurious -EEXIST failures from direct I/O reads.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f "$testfile"
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# In the case of fsync, filesystem should recover all the inode metadata, while
# recovering i_blocks and i_size at least for fdatasync.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown auto quick metadata punch
-here=`pwd`
-tmp=/tmp/$$
status=0 # failure will be detected in runtime!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/punch
# real QA test starts here
_supported_fs generic
-rm -f $seqres.full
_require_scratch
_require_scratch_shutdown
_require_xfs_io_command "fpunch"
# In ext4, up to 132 bytes of data can be stored in 256 bytes-sized inode.
# In f2fs, up to 3.4KB of data can be embedded into 4KB-sized inode block.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-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
+# Import common functions.
. ./common/filter
_supported_fs generic
#
# Make sure fs honors file size resource limit.
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# need a wrapper function so "File size limit exceeded" message can be filtered
do_truncate()
{
#
# Test setting and getting encryption policies.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption
# Test that FS_IOC_SET_ENCRYPTION_POLICY correctly validates the fscrypt_policy
# structure that userspace passes to it.
#
-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/preamble
+_begin_fstest auto quick encrypt
+
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption
# need to run all the xfstests with encryption enabled. Access without the
# encryption key, on the other hand, should result in some particular behaviors.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_symlinks
# not test enforcement of this constraint on lookup, which is still needed to
# detect offline changes.
#
-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/preamble
+_begin_fstest auto quick encrypt
+
+# Import common functions.
. ./common/filter
. ./common/encrypt
. ./common/renameat2
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption
touch $edir2/efile2
touch $udir/ufile
-
# Test linking and renaming an encrypted file into an encrypted directory with a
# different encryption policy. Should fail with EXDEV.
echo -e "\n*** Rename encrypted => encrypted ***"
$here/src/renameat2 $edir1/efile1 $edir2/efile1
-
# Test linking and renaming an unencrypted file into an encrypted directory.
# Should fail with EXDEV.
echo -e "\n*** Rename unencrypted => encrypted ***"
$here/src/renameat2 $udir/ufile $edir1/ufile
-
# Test linking and renaming an encrypted file into an unencrypted directory.
# Should succeed.
$here/src/renameat2 $edir1/efile1 $udir/efile1
$here/src/renameat2 $udir/efile1 $edir1/efile1 # undo
-
# Test renaming a forbidden (unencrypted, or encrypted with a different
# encryption policy) file into an encrypted directory via an exchange (cross
# rename) operation. Should fail with EXDEV.
echo -e "\n*** Exchange encrypted <=> unencrypted ***"
$here/src/renameat2 -x $edir1/efile1 $udir/ufile
-
# Test a file with a special type, i.e. not regular, directory, or symlink.
# Since such files are not subject to encryption, there should be no
# restrictions on linking or renaming them into encrypted directories.
ln -v $edir1/fifo $edir2/fifo | _filter_scratch
rm $edir1/fifo $edir2/fifo $udir/fifo
-
# Now test that *without* access to the encrypted key, we cannot use an exchange
# (cross rename) operation to move a forbidden file into an encrypted directory.
# initialization vector reuse bug fixed in commit 02fc59a0d28f ("f2fs/crypto:
# fix xts_tweak initialization").
#
-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/preamble
+_begin_fstest auto encrypt
+
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption
#
# Designed to use the new Q_GETNEXTQUOTA quotactl
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# For fs for which we know how to test the filetype feature (xfs|ext*)
# verify getting DT_UNKNOWN IFF feature is disabled.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_mknod
_require_test_program "t_dir_type"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# Exit status 1: test failed.
# Exit status 0: test passed.
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick rw bigtime
# Get standard environment, filters and checks.
-. ./common/rc
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Prerequisites for the test run.
_supported_fs generic
_require_scratch
# reproduces a bug on XFS where a getxattr of an existing attribute spuriously
# returned failure due to races with attribute fork conversion.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick attr
-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
+# Import common functions.
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# writes unique block content and checks md5sum of a result file after
# each block insert.
#
-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
+. ./common/preamble
+_begin_fstest auto quick insert
testfile=$TEST_DIR/$seq.file
pattern=$tmp.pattern
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $testfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Test mkfs against thin provision device, which has very small backing size,
# mkfs should return error when it hits EIO.
#
-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
+. ./common/preamble
+_begin_fstest auto mkfs thin
# Initialize dmthin device with very small backing size & very big virtual
# size, with the hope that mkfs hit EIO at mkfs time
BACKING_SIZE=$((1 * 1024 * 1024 / 512)) # 1M
VIRTUAL_SIZE=$((1 * 1024 * 1024 * 1024 * 1024 / 512)) # 1T
+# Override the default cleanup function.
_cleanup()
{
_dmthin_cleanup
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmthin
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# $SCRATCH_DEV won't be directly created filesystem on, so fsck isn't required
# Regression test for
# Btrfs: adjust outstanding_extents counter properly when dio write is split
#
-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/preamble
+_begin_fstest auto quick
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
#
# Verify that mtime is updated when cloning files
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone metadata
-here=`pwd`
status=0
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $destfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_reflink
echo "Silence is golden."
-rm -f $seqres.full
# pattern the files.
sourcefile=$TEST_DIR/clone_mtime_sourcefile
#
# Verify that mtime is not updated when deduping files.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone dedupe metadata
-here=`pwd`
status=0
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $destfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_dedupe
echo "Silence is golden."
-rm -f $seqres.full
# pattern the files.
sourcefile=$TEST_DIR/dedup_mtime_sourcefile
# |non-shared| shared | private | slave | invalid |
# ***************************************************************************
#
-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
+. ./common/preamble
+_begin_fstest auto quick mount
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $MNTHEAD
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
# |unbindable |shared |**unbindable | private | unbindable |
# ------------------------------------------------------------------------
#
-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
+. ./common/preamble
+_begin_fstest auto quick mount
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $MNTHEAD
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
# (no peer)vfsmount as peers. It case kernel dereference a NULL
# address.
#
-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
+. ./common/preamble
+_begin_fstest auto quick mount
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $MNTHEAD
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
# hole, after unmounting and mounting again the filesystem, the file has a
# correct size and no data loss happened.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_odirect
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
#
# mmap direct/buffered io between DAX and non-DAX mountpoints.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick dax
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs generic
_require_test
_require_scratch_dax_mountopt "dax"
# Check that reflinking adjacent blocks in a file produces a single
# block mapping extent.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# test for races between write or fpunch operations on reflinked files
# to read operations on the target file
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto clone punch
-here=`pwd`
-tmp=/tmp/$$
status=0 # success 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
+# Import common functions.
. ./common/reflink
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_reflink
# Inspired by a bug in a btrfs fix, which doesn't get exposed by current test
# cases
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto enospc
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# A filesystem that crashes with open but unlinked inodes should
# be consistent after a ro, ro->rw, or rw mount cycle.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick shutdown log
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch
_require_metadata_journaling $SCRATCH_DEV
_require_test_program "multi_open_unlink"
-
function create_dirty_orphans() {
_scratch_mount
# Regression test for commit c771c14baa33 ("iomap: invalidate page caches
# should be after iomap_dio_complete() in direct write")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
# 173b8439e1ba ("ext4: don't allow encrypted operations without keys")
# 363fa4e078cb ("f2fs: don't allow encrypted operations without keys")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
. ./common/renameat2
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption
# Verify fallocate(mode=FALLOC_FL_KEEP_SIZE|FALLOC_FL_PUNCH_HOLE) does
# not alter the file size.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick punch
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# 1b53cf9815bb ("fscrypt: remove broken support for detecting keyring key
# revocation").
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt dangerous
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption
# correct values for the number of blocks allocated for a file when there are
# delayed allocations.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_xfs_io_command "falloc" "-k"
_require_odirect
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
#
# Test the statx system call
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $TEST_DIR/$seq-*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test the statx stx_attribute flags that can be set with chattr
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $testfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Check that FIEMAP produces some output when we require an external
# block to hold extended attributes.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick attr
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
wait
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
# Check stale handles pointing to unlinked files
# and non-stale handles pointing to linked files
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick exportfs
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# A known bug of XFS has been fixed by "e4229d6 xfs: fix eofblocks race
# with file extending async dio writes"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick aio rw
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# dax: fix data corruption due to stale mmap reads
# created by Ross Zwisler <ross.zwisler@linux.intel.com>
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick dax
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs generic
_require_test
# well, though we don't test for it because it's very difficult to reproduce:
# 3d43bcfef5f0 ("ext4 crypto: use dget_parent() in ext4_d_revalidate()")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption
# - Copy middle of original to a new file
# - Copy end of original to new file
# - Copy middle of original to a new file, creating a hole
-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 -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick copy_range
# get standard environment
-. common/rc
. common/filter
# real QA test starts here
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
-rm -f $seqres.full
echo "Create the original file and then copy"
$XFS_IO_PROG -f -c 'pwrite -S 0x61 0 1000' $testdir/file >> $seqres.full 2>&1
# Tests vfs_copy_file_range():
# - Copy a small file
# - Small copies from various points in the original file
-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 -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick copy_range
# get standard environment
-. common/rc
. common/filter
# real QA test starts here
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
-rm -f $seqres.full
echo "Create the original file and then copy"
echo -n "abcde" > $testdir/file
# - Use copy to swap data at beginning and end
# - Use copy to swap data in the middle
# - Use copy to simultaneously overwrite and append to destination file
-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 -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick copy_range
# get standard environment
-. common/rc
. common/filter
# real QA test starts here
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
-rm -f $seqres.full
echo "Create the original file and then copy"
$XFS_IO_PROG -f -c 'pwrite -S 0x61 0 1000' $testdir/file >> $seqres.full 2>&1
# - Use copy to swap data at beginning and end
# - Use copy to swap data in the middle
# - Use copy to swap data in a small file
-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 -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick copy_range
# get standard environment
-. common/rc
. common/filter
# real QA test starts here
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
-rm -f $seqres.full
echo "Create the original file and then copy"
echo -n "abcde" > $testdir/file
# FS QA Test No. 434
#
# Tests vfs_copy_file_range() error checking
-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 -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick copy_range
# get standard environment
-. common/rc
. common/filter
# real QA test starts here
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
-rm -f $seqres.full
echo "Create the original files"
$XFS_IO_PROG -f -c 'pwrite -S 0x61 0 1000' $testdir/file >> $seqres.full 2>&1
# Even with these two fixes it's still possible to create intentional
# collisions. For now this test covers "accidental" collisions only.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption
#
# More SEEK_DATA/SEEK_HOLE sanity tests.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw seek prealloc
-here=`pwd`
tmp=$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile
+# Override the default cleanup function.
_cleanup()
{
rm -f $tmp.* $BASE_TEST_FILE.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs generic
# dax: Fix race between colliding PMD & PTE entries
# created by Ross Zwisler <ross.zwisler@linux.intel.com>
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick dax
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs generic
_require_test
#
# Based on test program by Michael Zimmer <michael@swarm64.com>
#
-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
+. ./common/preamble
+_begin_fstest auto
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $FILE
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs generic
_require_test
# hole, no warnings are emmitted in syslog/dmesg and the file's content is
# correct after remounting the filesystem.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-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/preamble
+_begin_fstest auto quick punch
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# from the keyring. Regression test for:
# 272f98f68462 ("fscrypt: fix context consistency check when key(s) unavailable")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption
# on all fds and fsync on all fds. Ensure that we get errors on all of them.
# Then fsync on all one last time and verify that all return 0.
#
-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
+. ./common/preamble
+_begin_fstest auto quick eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmerror
_require_test_program fsync-err
_require_test_program dmerror
-rm -f $seqres.full
-
# Disable the scratch rt device to avoid test failures relating to the rt
# bitmap consuming all the free space in our small data device.
unset SCRATCH_RTDEV
# Test writeback error handling when writing to block devices via pagecache.
# See src/fsync-err.c for details of what test actually does.
#
-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
+. ./common/preamble
+_begin_fstest blockdev eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmerror
_require_test_program fsync-err
_require_test_program dmerror
-rm -f $seqres.full
-
_dmerror_init
$here/src/fsync-err -d $here/src/dmerror $DMERROR_DEV
#
# Takes page fault while writev is iterating over the vectors in the IOV
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
# Check if SGID is inherited when creating a subdirectory when the owner is not
# in the owning group and directory has default ACLs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick acl
-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
+# Import common functions.
. ./common/filter
. ./common/attr
#
# Another SEEK_DATA/SEEK_HOLE sanity test.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw seek prealloc
-here=`pwd`
tmp=$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile
+# Override the default cleanup function.
_cleanup()
{
rm -f $tmp.* $BASE_TEST_FILE.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs generic
# mapped write to a hole in a file. On xfs filesystem, it
# will trigger a BUG_ON().
#
-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()
-{
- rm -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick rw punch
# get standard environment and checks
-. ./common/rc
. ./common/filter
# real QA test starts here
_require_xfs_io_command "truncate"
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
# format and mount
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# See how well we handle deleting a file with a million refcount extents.
#
-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
+. ./common/preamble
+_begin_fstest auto clone punch
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f "$tmp".* $testdir/file1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
#
# Check what happens when SEEK_HOLE/SEEK_DATA are fed negative offsets.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw seek
BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile_$seq
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $BASE_TEST_FILE
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs generic
# possible. Then call setfacl on it and, if this fails for lack of
# space, test that the permissions remain the same.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick acl attr enospc
-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
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# 2d4594acbf6d fix the regression from "direct-io: Fix negative return
# from dio read beyond eof"
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tfile
}
-# get standard environment, filters and checks
-. ./common/rc
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
# real QA test starts here
_supported_fs generic
# Test data integrity when mixing buffered reads and asynchronous
# direct writes a file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw aio
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
# real QA test starts here
_supported_fs generic
# commit fd96b8da68d3 ("ext4: fix fault handling when mounted with -o dax,ro")
# created by Ross Zwisler <ross.zwisler@linux.intel.com>
#
-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/preamble
+_begin_fstest auto quick dax
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# Modify as appropriate.
_supported_fs generic
# Linux filesystems should allow this (filenames are a sequence of
# arbitrary bytes) even if the user implications are horrifying.
#
-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()
-{
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick dir
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
_require_scratch
# Linux filesystems should allow this (filenames are a sequence of
# arbitrary bytes) even if the user implications are horrifying.
#
-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()
-{
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick attr
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/attr
_require_scratch
#
# Run fsx with log writes to verify power fail safeness.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto log replay
+# Override the default cleanup function.
_cleanup()
{
_log_writes_cleanup
_dmthin_cleanup
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmthin
. ./common/dmlogwrites
_require_log_writes
_require_dm_target thin-pool
-rm -f $seqres.full
-
check_files()
{
local name=$1
# i_disksize and fixed by commit 801674f34ecf ("ext4: do not zeroout extents
# beyond i_disksize").
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick metadata collapse zero prealloc
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
cd /
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_xfs_io_command "fzero"
_require_xfs_io_command "fcollapse"
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
#
# Run fsx with log writes on cloned files to verify power fail safeness.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto log replay clone
+# Override the default cleanup function.
_cleanup()
{
_log_writes_cleanup
_dmthin_cleanup
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmthin
_require_log_writes
_require_dm_target thin-pool
-rm -f $seqres.full
-
check_files()
{
local name=$1
# Fixed by commit 3af423b03435 ("xfs: evict CoW fork extents when performing
# finsert/fcollapse")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone collapse insert zero
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "finsert"
_require_xfs_io_command "truncate"
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
#
# This test might hang the filesystem when ran on an unpatched kernel
#
-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
+. ./common/preamble
+_begin_fstest auto freeze thin
+# Override the default cleanup function.
_cleanup()
{
cd /
$LVM_PROG pvremove -ff $SCRATCH_DEV >>$seqres.full 2>&1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_require_command "$THIN_CHECK_PROG" thin_check
_require_freeze
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
vgname=vg_$seq
lvname=lv_$seq
poolname=pool_$seq
_mkfs_dev /dev/mapper/$vgname-$lvname >>$seqres.full 2>&1
-
# Running the test over the original volume doesn't reproduce the problem
# reliably, while, running it over a snapshot, makes the problem 100%
# reproducible, so, create a snapshot and run the test over it.
# This was only seen on XFS with rmapbt feature enabled, but nothing prevents
# the test from being a generic test.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
testfile=$SCRATCH_MNT/1G_file.$seq
file_size=$((1024 * 1024 * 1024))
-trap "_cleanup; exit \$status" 0 1 2 3 15
saved_dirty_background_ratio=0
saved_dirty_ratio=0
fi
}
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# test with scratch device, because test is known to corrupt fs, we don't want
# Shutdown stress test - exercise shutdown codepath with fsstress,
# make sure we don't BUG/WARN. Coverage for all fs with shutdown.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto shutdown stress
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs generic
_require_scratch_shutdown
_require_command "$KILLALL_PROG" killall
-rm -f $seqres.full
-
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount
# This is reproducible only when testing on pmem device
# which is configured in "memory mode", not in "raw mode".
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick dax
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs generic
_require_test
#
# Test racy COW AIO write completions.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $TEST_DIR/file $TEST_DIR/clone
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs generic
_require_test
# Run delalloc writes & append writes & non-data-integrity syncs concurrently
# to test the race between block map change vs writeback.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw
-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
+# Import common functions.
. ./common/filter
MAXFILES=200
$XFS_IO_PROG -c "sync_range -w 0 0" `getfile` >/dev/null 2>&1
}
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# do fsck after each iteration in test
#
# Test i_size is updated properly under dio read/write
#
-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
+. ./common/preamble
+_begin_fstest auto rw quick aio
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $testfile.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
min_dio_align=`_min_dio_alignment $TEST_DEV`
page_size=`$here/src/feature -s`
-rm -f $seqres.full
-
echo "non-aio dio test"
align=$min_dio_align
while [ $align -le $page_size ]; do
#
# Check that high-offset reads and writes work.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_nocheck
_require_block_device $SCRATCH_DEV
-rm -f $seqres.full
-
echo "Silence is golden"
# clear MKFS_OPTIONS which may contain user specified block size value, and
# - open by file handle of unlinked open files
# - open by file handle of renamed files
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick exportfs
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# recovering i_blocks and i_size at least for fdatasync, so this testcase excepts
# that inode metadata will be unchanged after recovery.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown auto quick metadata
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# Patch "xfs: truncate pagecache before writeback in xfs_setattr_size()" fixed
# the bug on XFS.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick punch zero
-here=`pwd`
-tmp=/tmp/$$
file=$TEST_DIR/$seq.fsx
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $file $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
# Use dm-log-writes to verify that MAP_SYNC actually syncs metadata during
# page faults.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-tmp=/tmp/$$
-here=`pwd`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick dax
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmthin
. ./common/dmlogwrites
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_nocheck
# using RWF_NOWAIT. I/O should finish within 50 microsecods since
# block allocations are already performed.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/populate
. ./common/filter
. ./common/attr
#
# Test various swapfile activation oddities.
#
-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
+. ./common/preamble
+_begin_fstest auto quick swap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_swapfile
_require_test_program mkswap
_require_test_program swapon
-rm -f $seqres.full
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount >>$seqres.full 2>&1
# This tests various combinations of hole + data layout being printed.
# Also the test used 16k holes to be compatible with 16k block filesystems
#
-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/punch
+. ./common/preamble
+_begin_fstest broken
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/punch
# real QA test starts here
# Test will be skipped if filesystem(or underlying filesystem of overlayfs)
# does not support shutdown.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick shutdown metadata
-here=`pwd`
-tmp=/tmp/$$
status=0
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# is a Good Enough (tm) simulation of our internal multipath failure
# testing efforts.
#
-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
+. ./common/preamble
+_begin_fstest shutdown auto log metadata eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dmerror
# Modify as appropriate.
_require_dm_target error
_require_command "$KILLALL_PROG" "killall"
-rm -f $seqres.full
-
echo "Silence is golden."
_scratch_mkfs >> $seqres.full 2>&1
# Run an all-writes fsstress run with multiple threads to shake out
# bugs in the write path.
#
-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
+. ./common/preamble
+_begin_fstest auto rw
+# Override the default cleanup function.
_cleanup()
{
cd /
$KILLALL_PROG -9 fsstress > /dev/null 2>&1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# Modify as appropriate.
_supported_fs generic
_require_scratch
_require_command "$KILLALL_PROG" "killall"
-rm -f $seqres.full
-
echo "Silence is golden."
_scratch_mkfs > $seqres.full 2>&1
# This test uses load and store of file handles from a temp file to test
# decoding file handles after cycle mount and after directory renames.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick exportfs
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# + clone with CLONE_FILES or not
# + dup and close newfd
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs generic
_require_test
# commit the journal/log, if a power loss happens the filesystem will not fail
# to replay the journal/log when it is mounted the next time.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_mknod
_require_dm_target flakey
-rm -f $seqres.full
-
run_test()
{
local file_type=$1
# with the name of the link removed, fsync the new file and have a power loss,
# mounting the filesystem succeeds.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick metadata log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# The kernel fix is
# Btrfs: fix unexpected -EEXIST when creating new inode
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log metadata
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
#
# Will do log replay and check the filesystem.
#
-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
+. ./common/preamble
+_begin_fstest auto metadata replay thin
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmthin
. ./common/dmlogwrites
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
_require_log_writes
_require_dm_target thin-pool
-
nr_cpus=$("$here/src/feature" -o)
# cap nr_cpus to 8 to avoid spending too much time on hosts with many cpus
if [ $nr_cpus -gt 8 ]; then
# Test that fsync operations preserve extents allocated with fallocate(2) that
# are placed beyond a file's size.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log metadata
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
. ./common/punch
_require_xfs_io_command "falloc" "-k"
_require_xfs_io_command "fiemap"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# vfs: track per-sb writeback errors and report them to syncfs
# buffer: record blockdev write errors in super_block that it backs
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmerror
_require_dm_target error
_require_xfs_io_command "syncfs"
-rm -f $seqres.full
-
# Disable the scratch rt device to avoid test failures relating to the rt
# bitmap consuming all the free space in our small data device.
unset SCRATCH_RTDEV
_dmerror_init
_dmerror_mount
-
# create file
testfile=$SCRATCH_MNT/syncfs-reports-errors
touch $testfile
# 349fa7d6e193 ("ext4: prevent right-shifting extents beyond EXT_MAX_BLOCKS")
# 7d83fb14258b ("xfs: prevent creating negative-sized file via INSERT_RANGE")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick insert
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $testfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
# Commit 7b38460dc8e4 ("xfs: don't fail when converting shortform attr to long
# form during ATTR_REPLACE") fixed the xfs bug.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick attr
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $testfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test_program "attr_replace_test"
_require_attrs
_require_scratch
-rm -f $seqres.full
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount >>$seqres.full 2>&1
# on all fds and fsync on all fds. Ensure that we get errors on all of them.
# Then fsync on all one last time and verify that all return 0.
#
-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
+. ./common/preamble
+_begin_fstest auto quick eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmerror
_require_logdev
_require_dm_target error
-rm -f $seqres.full
-
# Disable the scratch rt device to avoid test failures relating to the rt
# bitmap consuming all the free space in our small data device.
unset SCRATCH_RTDEV
# Test having many file descriptors referring to deleted files open. Regression
# test for patch "Btrfs: fix ENOSPC caused by orphan items reservations".
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-. ./common/rc
. ./common/filter
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch
_require_test_program "multi_open_unlink"
# Test that xattrs are not lost after calling fsync multiple times with a
# filesystem commit in between the fsync calls.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick attr log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
. ./common/attr
_require_dm_target flakey
_require_attrs
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# for that. The problem has been fixed by commit 2ee3ee06a8fd79 "ext4: fix hole
# length detection in ext4_ind_map_blocks()"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw seek
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs generic
_require_test_program "seek_sanity_test"
+# Override the default cleanup function.
_cleanup()
{
cd /
# With ext4, this leads to freeze proection bypass WARN_ON in
# ext4_journal_check_start.
#
-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/preamble
+_begin_fstest auto quick freeze mount
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_freeze
_require_command "$TIMEOUT_PROG" "timeout"
-rm -f $seqres.full
-
testfile=$SCRATCH_MNT/foo
# Create a filesystem with a file
#
# Test the online filesystem label set/get ioctls
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
#
# Check that we can't dedupe a swapfile.
#
-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.*
-}
-
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick swap dedupe
+
. ./common/filter
. ./common/reflink
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch_swapfile
_require_scratch_dedupe
#
# Test truncation/hole punching of an active swapfile.
#
-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.*
-}
-
-. ./common/rc
-. ./common/filter
+. ./common/preamble
+_begin_fstest auto quick swap punch
-rm -f $seqres.full
+. ./common/filter
_supported_fs generic
_require_scratch_swapfile
#
# Test invalid swap file (with holes)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick swap
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch_swapfile
_require_test_program mkswap
# Test various swapfile activation oddities on filesystems that support
# fallocated swapfiles (for given fs ext4/xfs)
#
-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
+. ./common/preamble
+_begin_fstest auto quick swap prealloc
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_swapfile
_require_test_program swapon
_require_xfs_io_command "falloc"
-rm -f $seqres.full
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount >>$seqres.full 2>&1
# Test various swapfile activation oddities, having used fcollapse to
# create discontiguous ranges in the file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick swap collapse
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_swapfile
_require_test_program swapon
_require_xfs_io_command "fcollapse"
-rm -f $seqres.full
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount >>$seqres.full 2>&1
# fsync'ed, fsync a parent directory of the new hard link and power fail,
# the parent directory exists after mounting the filesystem again.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# Test a specific sequence of fsx operations that causes an mmap read past
# eof to return nonzero contents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick rw collapse zero
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/punch
# real QA test starts here
_require_xfs_io_command "fcollapse"
_require_xfs_io_command "fzero"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# (XFS) shutdown. (Fixed by 8c81dd46ef3c Force log to disk before reading
# the AGF during a fstrim)
#
-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
+. ./common/preamble
+_begin_fstest auto thin trim
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmthin_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmthin
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_nocheck
# the file again and then power fail, after we mount again the filesystem, no
# file data was lost or corrupted.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick clone log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmflakey
_require_scratch_reflink
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# fsync this new file and power fail, we will be able to mount again the
# filesystem and the new file and all hard links exist.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# DAX setup, but the test runs fine with or without DAX and with XFS so we
# don't require the DAX mount option or a specific filesystem for the test.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick dax punch collapse zero
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs generic
_require_test
# Open new fd by exec shell built-in, then require exclusive lock
# by flock(1) command. Checking /proc/locks for the lock info.
#
-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
+. ./common/preamble
+_begin_fstest auto quick locks
+# Override the default cleanup function.
_cleanup()
{
exec {test_fd}<&-
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
# 7. mount;
# 8. check uid/gid
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown auto quick metadata
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# 6. mount;
# 7. check project id
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown auto quick metadata quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# 12. mount;
# 13. check i_flags
#
-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
+. ./common/preamble
+_begin_fstest shutdown auto quick metadata
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# 5. mount;
# 6. check creation time
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown auto quick metadata
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# power fail, we will be able to mount the filesystem without triggering any
# crashes, warnings or corruptions.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_xfs_io_command "-T"
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# mounting the filesystem the file has a single parent, named B and there
# is no longer any directory with the name A.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# Test a specific sequence of fsx operations that causes an mmap read past
# eof to return nonzero contents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick rw zero
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/punch
# real QA test starts here
_require_xfs_io_command "falloc" "-k"
_require_xfs_io_command "fzero"
-rm -f $seqres.full
-
_scratch_mkfs_sized $((1024 * 1024 * 256)) >>$seqres.full 2>&1
_scratch_mount
# file's current size, fsync the file and then power fail, after mounting the
# filesystem all the file data is there and the file size is correct.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log prealloc
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_xfs_io_command "falloc"
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
#
# Ensure that ctime is updated and capabilities are cleared when reflinking.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-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/preamble
+_begin_fstest auto quick clone
+
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_command "$GETCAP_PROG" getcap
_require_command "$SETCAP_PROG" setcap
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
#
# Ensure that file size resource limits are respected when reflinking.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick clone
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_user
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# of a reproducer script that Eric Sandeen formulated from a stale data
# exposure bug uncovered by shared/010.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick clone
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
# Fill disk with a well known pattern so that stale data exposure becomes much
# more obvious.
$XFS_IO_PROG -c "pwrite -S 0x58 -b 1m 0 300m" $SCRATCH_DEV >> $seqres.full
# - Fail to dedupe non-identical parts of two different files
# - Check that nothing changes in either file
#
-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
+. ./common/preamble
+_begin_fstest auto quick dedupe clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
# real QA test starts here
_require_test_dedupe
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# to the filesystem's block size into the middle of a different file does not
# corrupt the destination's file data by reflinking the last (eof) block.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-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/preamble
+_begin_fstest auto quick dedupe clone
+
+# Import common functions.
. ./common/filter
. ./common/reflink
_supported_fs generic
_require_scratch_dedupe
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# data corruption since the data between EOF and the end of its block is
# undefined.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-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/preamble
+_begin_fstest auto quick clone
+
+# Import common functions.
. ./common/filter
. ./common/reflink
_supported_fs generic
_require_scratch_reflink
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# Verify if there's physical address overlap returned by FIBMAP, cover:
# 79b3dbe4adb3 fs: fix iomap_bmap position calculation
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch
# Test if we create a hard link to a file and persist either of the files, all
# the names persist.
#
-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
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
# 256MB in byte
fssize=$((2**20 * 256))
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_nocheck
before=""
after=""
-
# Using _scratch_mkfs instead of cleaning up the working directory,
# adds about 10 seconds of delay in total for the 37 tests.
clean_dir()
clean_dir
}
-
# Create different combinations to run the link test
# Group 0: Both files within root directory
file_names[0]="foo bar"
#
# Long-soak directio fsx test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest soak long_rw
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Long-soak buffered fsx test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest soak long_rw
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Check that xattrs can have slashes in their name.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick attr
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/attr
. ./common/filter
_require_scratch
_require_attrs
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
# partly stale mapping and potentially leaving delalloc blocks in the current
# mapping unconverted.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
# real QA test starts here
# This is a variant of test generic/466 for filesystems that
# do not support mkfs_sized.
#
-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/preamble
+_begin_fstest auto quick rw
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# failure we are able to mount the filesystem and all file names correspond to
# the correct inodes.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# after a power failure we are able to mount the filesystem and all file names
# correspond to the correct inodes.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_hardlinks
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# we created a file. A bug caught during code review of xfs patches revealed
# that there weren't any sanity checks of the btime values.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick
testfile=$TEST_DIR/$seq.txt
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $testfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/attr
. ./common/filter
_require_xfs_io_command "statx" "-r"
_require_btime
-rm -f $seqres.full
rm -f $testfile
# Create a file and the time we created it
# Regression test for a bug where XFS corrupts memory if the listxattr buffer
# is a particularly well crafted size on a filesystem that supports posix acls.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick acl attr
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/attr
# real QA test starts here
_require_scratch
_require_test_program "t_attr_corruption"
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
#
# Use only a single CPU to test the single threaded situation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick shutdown unlink
testfile=$TEST_DIR/$seq.txt
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs generic
_require_metadata_journaling
_require_test_program "t_open_tmpfiles"
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
#
# Use every CPU possible to stress the filesystem.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick unlink
testfile=$TEST_DIR/$seq.txt
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs generic
_require_scratch
_require_test_program "t_open_tmpfiles"
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
# sets attribute flags anyway, which is fixed by commit 1b9598c8fb99 ("xfs: fix
# reporting supported extra file attributes for statx()")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $testfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs generic
test $(( attrs & ~(mask) )) -ne 0 && echo "attributes $attrs do not appear in mask $mask"
}
-rm -f $seqres.full
echo "Silence is golden"
# Create file, check for incorrect mask
#
# Simple attr smoke tests for user EAs, dereived from generic/097.
#
-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
+. ./common/preamble
+_begin_fstest auto quick attr
file=$TEST_DIR/foo.$seq
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
getfattr()
{
_getfattr --absolute-names "$@" |& _filter_test_dir
$SETFATTR_PROG "$@" |& _filter_test_dir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/attr
. ./common/filter
_require_test
_require_attrs
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
echo -e "\ncreate file foo.$seq"
rm -f $file
touch $file
# Test that if we truncate a file to reduce its size, rename it and then fsync
# it, after a power failure the file has a correct size and name.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# 8. remount
# 9. check i_mode
#
-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
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# historically susceptible to this problem in the window between delalloc to
# physical extent conversion and writeback completion.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw shutdown
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
# real QA test starts here
# xfs: prohibit fstrim in norecovery mode
# Btrfs: do not allow trimming when a fs is mounted with the nologreplay option
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick trim
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_fstrim
-rm -f $seqres.full
-
_scratch_mkfs > $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
# the potential of corrupting the previous unaligned write to the same
# block.)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick aio
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
#
# Check that SEEK_HOLE can find a punched hole.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick punch seek
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
_supported_fs generic
_require_test_program "seek_sanity_test"
+# Override the default cleanup function.
_cleanup()
{
cd /
# - reflink across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - reflink across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - reflink across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - reflink across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# double-inode locking order correctness as well as stressing things like ocfs2
# which have per-inode sharing groups and therefore have to check that we don't
# try to link data between disjoint sharing groups.
-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 -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick clone
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Check that we can't set the FS_APPEND_FL and FS_IMMUTABLE_FL inode
# flags without capbility CAP_LINUX_IMMUTABLE
#
-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
+. ./common/preamble
+_begin_fstest auto quick cap
+# Override the default cleanup function.
_cleanup()
{
# Cleanup of flags on both file in case test is aborted
rm -rf $tmp.* $workdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
# - No data loss even power loss happens after fsync
# All operations above should not fail.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone enospc log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmflakey
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# then verify that all files and directories exist, with the same data and
# metadata they had before the power failure.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_fssum
_require_dm_target flakey
-rm -f $seqres.full
-
fssum_files_dir=$TEST_DIR/generic-test-$seq
rm -fr $fssum_files_dir
mkdir $fssum_files_dir
# Verify ciphertext for v1 encryption policies that use AES-256-XTS to encrypt
# file contents and AES-256-CTS-CBC to encrypt file names.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# Verify ciphertext for v1 encryption policies that use AES-128-CBC-ESSIV to
# encrypt file contents and AES-128-CTS-CBC to encrypt file names.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# Verify ciphertext for v1 encryption policies that use Adiantum to encrypt file
# contents and file names.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
#
# Randomly direct AIO write&verify stress test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto stress aio
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch
# parent directory's inode is not evicted due to being in use), then we rename
# the file and fsync it, after a power failure the file data is not lost.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_odirect
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# This is a regression test for kernel commit:
# 96e6e8f4a68d ("vfs: add missing checks to copy_file_range")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copy_range
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
workdir="$TEST_DIR/test-$seq"
+# Override the default cleanup function.
_cleanup()
{
$XFS_IO_PROG -f -r -c "chattr -i" $workdir/immutable >/dev/null 2>&1
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
-rm -f $seqres.full
-
_require_test
_require_xfs_io_command "copy_range"
_require_xfs_io_command "chattr" "i"
rm -rf $workdir
mkdir $workdir
-rm -f $seqres.full
-
$XFS_IO_PROG -f -c "pwrite -S 0x61 0 128k" $workdir/file >> $seqres.full 2>&1
# we have to open the file to be immutable rw and hold it open over the
# This is a regression test for kernel commit:
# 96e6e8f4a68d ("vfs: add missing checks to copy_file_range")
#
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick copy_range swap
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
-rm -f $seqres.full
-
_require_scratch
_require_xfs_io_command "copy_range"
_require_scratch_swapfile
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-rm -f $seqres.full
-
$XFS_IO_PROG -f -c "pwrite -S 0x61 0 128k" $SCRATCH_MNT/file >> $seqres.full 2>&1
echo swap files return ETXTBUSY
# This test uses xfs_io chattr, rather than the (e2fsprogs) chattr
# program to exercise the FS_IOC_FSSETXATTR ioctl.
#
-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
+. ./common/preamble
+_begin_fstest auto quick cap
+# Override the default cleanup function.
_cleanup()
{
# Cleanup of flags on both file in case test is aborted
rm -rf $tmp.* $workdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
# Test the basic functionality of filesystems with case-insensitive
# support.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-status=1 # failure is thea default
+. ./common/preamble
+_begin_fstest auto quick casefold
-. ./common/rc
. ./common/filter
. ./common/casefold
. ./common/attr
# Test that if we fsync a file, evict its inode, unlink it and then fsync its
# parent directory, after a power failure the file does not exists.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
_require_scratch
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
# Also a regression test for xfsprogs commit
# d586858 xfs_repair: fix sibling pointer tests in verify_dir2_path()
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto enospc
create_file()
{
done
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_inode_limits
_require_scratch
-rm -f $seqres.full
echo "Silence is golden"
_scratch_mkfs_sized $((1024 * 1024 * 1024)) >>$seqres.full 2>&1
#
# Dedupe a single big file and verify integrity
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto stress dedupe
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_duperemove
# times (d0 -> d1, d1 -> d2, ... dn-1 -> dn), dedupe dataN everytime
# before copy. At last, verify dataN same with data0.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto stress dedupe
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_duperemove
# Dedup & random I/O race test, do multi-threads fsstress and dedupe on
# same directory/files
#
-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
+. ./common/preamble
+_begin_fstest auto stress dedupe
+# Override the default cleanup function.
_cleanup()
{
cd /
end_test
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_duperemove
# many small extents, when the fs is nearly full, the clone operation does
# not fail and produces the correct result.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto clone punch
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_program "punch-alternating"
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
_scratch_mkfs_sized $((512 * 1024 * 1024)) >>$seqres.full 2>&1
_scratch_mount
# them into cache.
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
_destroy_loop_device $LOOP_DEV > /dev/null 2>&1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/cgroup2
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This is a regression test for kernel commit:
# 96e6e8f4a68d ("vfs: add missing checks to copy_file_range")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copy_range
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
[ -z "$loopdev" ] || _destroy_loop_device $loopdev
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
-rm -f $seqres.full
-
_require_test
_require_loop
# for mkfifo
rm -rf $testdir
mkdir $testdir
-rm -f $seqres.full
-
$XFS_IO_PROG -f -c "pwrite -S 0x61 0 128k" $testdir/file >> $seqres.full 2>&1
echo source range overlaps destination range in same file returns EINVAL
#
# 5dae222a5ff0 vfs: allow copy_file_range to copy across devices
#
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick copy_range
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
-rm -f $seqres.full
-
_require_test
_require_scratch
_require_xfs_io_command "copy_range"
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
-rm -f $seqres.full
$XFS_IO_PROG -f -c "pwrite -S 0x61 0 128k" $testdir/file >> $seqres.full 2>&1
# This test goes with commit 1fb254aa983bf ("xfs: fix missing ILOCK unlock when
# xfs_setattr_nonsize fails due to EDQUOT")
-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
+. ./common/preamble
+_begin_fstest auto quick quota metadata
+# Override the default cleanup function.
_cleanup()
{
cd /
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/quota
. ./common/filter
_require_xfs_quota_foreign
_require_user
-rm -f $seqres.full
-
_qmount_option "grpquota"
_scratch_mkfs > $seqres.full
_qmount
#
# (generic/029 is a similar test but for truncate.)
#
-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/preamble
+_begin_fstest auto quick rw punch
+
+# Import common functions.
. ./common/filter
# real QA test starts here
# Test that fallocating an unaligned range allocates all blocks
# touched by that range
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw prealloc
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f "$TEST_DIR/falloctest-$seq"
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Check that we can't modify a file that's an active swap file.
-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
+. ./common/preamble
+_begin_fstest auto quick rw swap prealloc
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_test_program swapon
_require_scratch_swapfile
-rm -f $seqres.full
-
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Check that we can't modify a block device that's an active swap device.
-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
+. ./common/preamble
+_begin_fstest auto quick rw swap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_block_device $SCRATCH_DEV
test -e /dev/snapshot && _notrun "userspace hibernation to swap is enabled"
-rm -f $seqres.full
-
$MKSWAP_PROG "$SCRATCH_DEV" >> $seqres.full
# Can you modify the swap dev via previously open file descriptors?
#
# lease test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/locktest
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
# real QA test starts here
_supported_fs generic
_require_test
# - can't change contents of verity files, but can change metadata
# - can retrieve a verity file's measurement via FS_IOC_MEASURE_VERITY
#
-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
+. ./common/preamble
+_begin_fstest auto quick verity
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/verity
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_verity
# Test access controls on the fs-verity ioctls. FS_IOC_MEASURE_VERITY is
# allowed on any file, whereas FS_IOC_ENABLE_VERITY requires write access.
#
-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
+. ./common/preamble
+_begin_fstest auto quick verity
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/verity
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_verity
# the block device. It verifies that this causes I/O errors when the relevant
# part of the contents is later read by any means.
#
-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
+. ./common/preamble
+_begin_fstest auto quick verity
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/verity
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_verity
# verifies that fs-verity is doing its Merkle tree-based hashing correctly,
# i.e. that it hasn't been broken by a change.
#
-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
+. ./common/preamble
+_begin_fstest auto quick verity
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/verity
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_verity
# Test using fs-verity and fscrypt simultaneously. This primarily verifies
# correct ordering of the hooks for each feature: fscrypt needs to be first.
#
-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
+. ./common/preamble
+_begin_fstest auto quick verity encrypt
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/verity
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_verity
#
# Test the fs-verity built-in signature verification support.
#
-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
+. ./common/preamble
+_begin_fstest auto quick verity
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/verity
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_verity
#
# Make sure that we can handle multiple mmap writers to the same file.
-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
+. ./common/preamble
+_begin_fstest auto quick rw clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_test_reflink
_require_cp_reflink
-rm -f $seqres.full
-
compare() {
for i in $(seq 1 8); do
md5sum $testdir/file$i | _filter_test_dir
$((filesz - 777)) $testdir/file3 \
$(((blksz * 3) - 168)) $testdir/file4 \
-
echo "Compare files before remount" | tee -a $seqres.full
compare
_test_cycle_mount
# before, during, and after the fs-verity enablement), while fsstress is also
# running on the same filesystem.
#
-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
+. ./common/preamble
+_begin_fstest auto stress verity
+# Override the default cleanup function.
_cleanup()
{
# Stop all subprocesses.
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/verity
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_verity
# and v2 encryption policies.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
echo
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption -v 2
# and v2 encryption policies.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
echo
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
orig_maxkeys=
+# Override the default cleanup function.
_cleanup()
{
cd /
fi
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_user
#
# This is the same as generic/548, except using v2 policies.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
#
# This is the same as generic/549, except using v2 policies.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
#
# This is the same as generic/550, except using v2 policies.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# Regression test for:
# bc56ad8c74b8: ("xfs: Fix deadlock between AGI and AGF with RENAME_WHITEOUT")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rename
-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
+# Import common functions.
. ./common/filter
. ./common/renameat2
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch
# simultaneously fallocating to the first block. Make sure that we end up
# with a two-block file.
-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
+. ./common/preamble
+_begin_fstest auto quick rw prealloc
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $testfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs generic
_require_test
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
testfile=$TEST_DIR/test-$seq
$AIO_TEST $testfile 100 >> $seqres.full
# This test accompanies the commit 2815a16d7ff623 "xfs: attach dquots and
# reserve quota blocks during unwritten conversion".
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw prealloc quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
_require_xfs_io_command "falloc"
_require_scratch
-rm -f $seqres.full
-
cat > $tmp.awk << ENDL
{
if (\$1 == qa_user && \$2 != blocks)
# fsync it again, power fail and then mount the filesystem, we are able to
# read the whole file and it has the correct data.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick log clone
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmflakey
_require_scratch_reflink
_require_dm_target flakey
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
#
#-----------------------------------------------------------------------
#
-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
+. ./common/preamble
+_begin_fstest auto mount
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $MNTHEAD
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
# bunmapi"). On XFS without the fixes, truncate will hang forever. On other
# filesystems, this just tests writing into big fallocates.
#
-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
+. ./common/preamble
+_begin_fstest auto prealloc preallocrw
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f "$TEST_DIR/$seq"
}
-. ./common/rc
. ./common/filter
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch_nocheck
_require_xfs_io_command "falloc"
#
# Test using splice() to read from pipes.
-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
+. ./common/preamble
+_begin_fstest auto quick rw pipe splice
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $TEST_DIR/a
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs generic
_require_odirect
_require_test_program "splice-test"
-rm -f $seqres.full
-
$here/src/splice-test -r $TEST_DIR/a
$here/src/splice-test -rd $TEST_DIR/a
$here/src/splice-test $TEST_DIR/a
# and use AES-256-XTS to encrypt file contents and AES-256-CTS-CBC to encrypt
# file names.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# "fscrypt-provisioning" keyring key. This is an alternative to the normal
# method where the raw key is given directly.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption -v 2
# Test per-type(user, group and project) filesystem quota timers, make sure
# each of grace time can be set/get properly.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch
# the corresponding fscrypt master key being removed. With f2fs, this bug could
# also crash the kernel.
#
-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
+. ./common/preamble
+_begin_fstest auto quick encrypt
+# Override the default cleanup function.
_cleanup()
{
# Stop all subprocesses.
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption -v 2
# PF_MEMALLOC before exiting xfsaild thread"). If the bug exists, a kernel
# WARNING should be triggered. See the commit message for details.
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
$ACCTON_PROG off >> $seqres.full
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_bsd_process_accounting
#
# Test protected_symlink and protected_hardlink sysctls
#
-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
+. ./common/preamble
+_begin_fstest auto quick perms
+# Override the default cleanup function.
_cleanup()
{
rm -rf $TEST_DIR/$seq
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test protected_regular and protected_fifos sysctls
#
-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
+. ./common/preamble
+_begin_fstest auto quick perms
+# Override the default cleanup function.
_cleanup()
{
rm -rf $TEST_DIR/$seq
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test data integrity for ro remount.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick remount shutdown
-here=`pwd`
-tmp=/tmp/$$
status=0
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_fssum
# This test only exercises user quota because it's not known whether the
# filesystem can set individual grace timers for each quota type
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch
# This test only exercises user quota because it's not known whether the
# filesystem can set individual grace timers for each quota type
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch
# and use AES-256-XTS to encrypt file contents and AES-256-CTS-CBC to encrypt
# file names.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# Test per-type(user, group and project) filesystem quota timers, make sure
# enforcement
#
-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
+. ./common/preamble
+_begin_fstest auto quick quota
+# Override the default cleanup function.
_cleanup()
{
restore_project
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
require_project()
{
rm -f $tmp.projects $tmp.projid
# Evicting dirty inodes can take a long time during umount.
# Check that a new mount racing with such a delayed umount succeeds.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick mount
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test per-inode DAX flag by mmap direct/buffered IO.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto attr quick dax
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch_dax_mountopt "dax=always"
_require_test_program "feature"
# 3) With dax=never option, FS_XFLAG_DAX is ignored and S_DAX flag
# never exists on regular file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto attr quick dax
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch_dax_mountopt "dax=always"
_require_dax_iflag
# 3) mv operation make files and directories preserve the FS_XFLAG_DAX from old parent directory.
# In addition, setting/clearing FS_XFLAG_DAX flag is not impacted by dax mount options.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto attr quick dax
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch
_require_dax_iflag
# It's a regression test for:
# 'commit 88149082bb8e ("fs: Handle I_DONTCACHE in iput_final() instead of generic_drop_inode()"'
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto attr quick dax
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch_dax_mountopt "dax=always"
_require_dax_iflag
# exercise O_DSYNC so any unsuspecting file systems will get lockdep warnings if
# their locking isn't compatible.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $TEST_DIR/file
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs generic
_require_test
# there are many small extents allocated. Verify the operation does not fail
# and the respective range return zeroes on subsequent reads.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-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/preamble
+_begin_fstest auto quick prealloc zero
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_xfs_io_command "fpunch"
_require_test_program "punch-alternating"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# This test verifies the problem fixed in kernel with commit
# f4020438fab0 ("xfs: fix boundary test in xfs_attr_shortform_verify")
-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/preamble
+_begin_fstest auto quick attr
+
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# upstream, and in the 5.4 stable tree with:
# aee38af574a1 "xfs: trim IO to found COW extent limit"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# In practice, they need to be random to achieve that; and it's easy enough to
# test for both uniqueness and randomness, so we test for both.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick encrypt
-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
+# Import common functions.
. ./common/filter
. ./common/encrypt
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch_encryption -v 2
# Test that after doing a memory mapped write to an empty file, a call to
# stat(2) reports a non-zero number of used blocks.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick rw
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# or direct IO writes, the number of used blocks reported by stat(2) is never
# zero while writeback is in progress.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto rw
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_odirect
-rm -f $seqres.full
-
stat_loop()
{
trap "wait; exit" SIGTERM
# IO_URING soak buffered fsx test, copy from generic/522 but reduce the number
# fsx ops to limit the testing time to be an auto group test.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw io_uring stress
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# IO_URING soak direct-IO fsx test, copy from generic/521 but reduce the number
# fsx ops to limit the testing time to be an auto group test.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw io_uring stress
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This test verifies the problem fixed in kernel with commit
# ada49d64fb35 ("xfs: fix forkoff miscalculation related to XFS_LITINO(mp)")
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick attr
-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
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# 993778306e79 ("ext4: mballoc: use lock for checking free blocks while
# retrying")
#
-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
+. ./common/preamble
+_begin_fstest auto rw enospc
FS_SIZE=$((240*1024*1024)) # 240MB
DEBUG=1 # set to 0 to disable debug statements in shell and c-prog
BIG_FILE_SIZE=$((1536 * 1024)) # in Bytes
MIX_FILE_SIZE=$((2048 * 1024)) # (BIG + SMALL small file size)
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs generic
_require_scratch
# This regression was fixed with following kernel commit commit b75dfde1212
# ("fibmap: Warn and return an error in case of block > INT_MAX")
#
-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
+. ./common/preamble
+_begin_fstest auto mount quick
+# Override the default cleanup function.
_cleanup()
{
_dmhugedisk_cleanup
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmhugedisk
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs generic
_require_scratch_size_nocheck $((4 * 1024 * 1024)) #kB
# To test this, we try to reproduce the above race. Afterwards we check for
# duplicate filenames, plus a few other things.
#
-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
+. ./common/preamble
+_begin_fstest auto quick encrypt
+# Override the default cleanup function.
_cleanup()
{
touch $tmp.done
rm -f $tmp.*
}
-. ./common/rc
. ./common/filter
. ./common/encrypt
. ./common/renameat2
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch_encryption -v 2
_require_renameat2 noreplace
# ("fs: fix lazytime expiration handling in __writeback_single_inode()").
# This test failed on XFS without that commit.
#
-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
+. ./common/preamble
+_begin_fstest auto shutdown metadata atime
DIRTY_EXPIRE_CENTISECS_ORIG=$(</proc/sys/vm/dirty_expire_centisecs)
DIRTY_WRITEBACK_CENTISECS_ORIG=$(</proc/sys/vm/dirty_writeback_centisecs)
restore_expiration_settings
}
+# Override the default cleanup function.
_cleanup()
{
restore_expiration_settings
rm -f $tmp.*
}
-. ./common/rc
. ./common/filter
-rm -f $seqres.full
-
_supported_fs generic
# This test uses the shutdown command, so it has to use the scratch filesystem
# rather than the test filesystem.
#
# Test a write fault scenario on a shutdown fs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick shutdown
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-. ./common/rc
. ./common/filter
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch_nocheck
_require_scratch_shutdown
# Test retrieving the Merkle tree and fs-verity descriptor of a verity file
# using FS_IOC_READ_VERITY_METADATA.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick verity
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-. ./common/rc
. ./common/filter
. ./common/verity
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch_verity
_disable_fsverity_signatures
# This is separate from the other tests for FS_IOC_READ_VERITY_METADATA because
# the fs-verity built-in signature support is optional.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick verity
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-. ./common/rc
. ./common/filter
. ./common/verity
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch_verity
_require_fsverity_builtin_signatures
# This is a regression test for kernel commit:
# 6b4b8e6b4ad8 ("ext4: ext4: fix bug for rename with RENAME_WHITEOUT")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rename enospc
-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
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/renameat2
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_scratch
# writing, there are still some occasional failures on ext4 when block
# size < page size.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto aio rw stress
-here=`pwd`
-tmp=/tmp/$$
fio_config=$tmp.fio
fio_out=$tmp.fio.out
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
EOF
-rm -f $seqres.full
-
_require_fio $fio_config
_require_xfs_io_command "falloc"
# remounting to check file contents. This is a regression test for commit
# 5ffce3cc22a0 ("xfs: force the log after remapping a synchronous-writes file")
-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
+. ./common/preamble
+_begin_fstest auto quick rw clone
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_xfs_io_command "chattr" "s"
_require_cp_reflink
-rm -f $seqres.full
-
# Format filesystem and set up quota limits
_scratch_mkfs > $seqres.full
_require_metadata_journaling $SCRATCH_DEV
# remounting to check file contents. This is a regression test for commit
# 5ffce3cc22a0 ("xfs: force the log after remapping a synchronous-writes file")
-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
+. ./common/preamble
+_begin_fstest auto quick rw copy_range
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmerror
_require_xfs_io_command "copy_range"
_require_scratch
-rm -f $seqres.full
-
# Format filesystem and set up quota limits
_scratch_mkfs > $seqres.full
_require_metadata_journaling $SCRATCH_DEV
# to the file after the dedupe prep function has decided that the file contents
# are identical and we can therefore go ahead with the remapping.
-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/preamble
+_begin_fstest auto quick rw dedupe clone
+
+# Import common functions.
. ./common/reflink
# real QA test starts here
_require_scratch_dedupe
_require_test_program "deduperace"
-rm -f $seqres.full
-
nr_ops=$((TIME_FACTOR * 10000))
# Format filesystem
# This is a regression test for commit 6da1b4b1ab36 ("xfs: fix an ABBA deadlock
# in xfs_rename").
-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
+. ./common/preamble
+_begin_fstest auto rw overlay rename
+# Override the default cleanup function.
_cleanup()
{
stop_workers
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/attr
# real QA test starts here
test "$FSTYP" = "overlay" && _notrun "Test does not apply to overlayfs."
_require_extra_fs overlay
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full
_scratch_mount
_supports_filetype $SCRATCH_MNT || _notrun "overlayfs test requires d_type"
# Kernel commit ee2e3f50629f ("mount: fix mounting of detached mounts onto
# targets that reside on shared mounts") fixed the bug.
#
-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.*
-}
-
-. ./common/rc
-
-rm -f $seqres.full
+. ./common/preamble
+_begin_fstest auto quick mount
_supported_fs generic
_require_test
#
# Test that idmapped mounts behave correctly.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick atime attr cap idmapped io_uring mount perms rw unlink
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
# and fails. If you see a failure on such a kernel, contact your distributor
# for an update.
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick atime bigtime
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs generic
_require_scratch
-rm -f $seqres.full
-
_scratch_mkfs > $seqres.full
_scratch_mount
# and fails. If you see a failure on such a kernel, contact your distributor
# for an update.
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick atime bigtime shutdown
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs generic
_require_scratch
_require_scratch_shutdown
-rm -f $seqres.full
-
_scratch_mkfs > $seqres.full
_scratch_mount
# Test invalid swap files.
# Empty swap file (only swap header)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick swap
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs generic
_require_scratch_swapfile
_require_test_program mkswap
# Check that directory modifications to an open dir are observed
# by a new open fd
#
-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 /
- rm -f $tmp.*
-}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick dir
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
_require_test
-rm -f $seqres.full
-
testdir=$TEST_DIR/test-$seq
rm -rf $testdir
mkdir $testdir
# This's a regression test cover kernel commit:
# 4f06dd92b5d0 ("fuse: fix write deadlock")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs generic
_require_test
# ERANGE. Upstream commit ed92d8c137b7 ("NFSv4: fix getacl ERANGE for some ACL
# buffer sizes") fixed this bug.
#
-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
+. ./common/preamble
+_begin_fstest auto quick nfs4_acl acl
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $acltest.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs nfs
_require_test_nfs_version 4
#
# Ensure that reflink works correctly with inline-data files.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs --fs-features=local,unwritten,refcount,inline-data > $seqres.full 2>&1
tunefs.ocfs2 --query '%H' $SCRATCH_DEV | grep -q 'inline-data' || \
# Kernel commit 0480334fa604 ("ovl: use O_LARGEFILE in ovl_copy_up()")
# fixed bug when copying up large file from lower dir.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# memory access) when the lower or upper directory belonged to a btrfs file
# system.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick metadata
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# prevents mounting overlayfs like this since v4.6-rc1.
# No harm to keep this test as a sanity check.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick whiteout
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test file copy up on overlayfs by changing mode bits.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest attr auto copyup quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs overlay
_require_scratch
# when unmount the underlying fs.
# Kernel commit ab79efab0 fixed this issue.
#
-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
+. ./common/preamble
+_begin_fstest auto copyup quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $upper_img
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Upstream commit 45d117389696 ("ovl: ignore lower entries when checking purity
# of non-directory entries") fixed the issue
#
-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/preamble
+_begin_fstest auto quick copyup whiteout
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
_supported_fs overlay
# Upstream commit ce9113bbcbf4 ("ovl: fix getcwd() failure after unsuccessful
# rmdir") fixed this issue
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $TEST_DIR/$seq
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_test
# This upstream kernel patch fixed the issue
# d0e13f5 ovl: fix uid/gid when creating over whiteout
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick whiteout
-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
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# This is fixed by kernel commit named as
# ovl: fix dentry leak for default_permissions
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# The following kernel commit fixed the kernel crash on the removal
# 84889d4 ovl: check dentry positiveness in ovl_cleanup_whiteouts()
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick whiteout
-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
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# Use non-default scratch underlying overlay dirs, we need to check
#
# Commit b581755b1c56 ("ovl: xattr filter fix") fixed this issue.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
. ./common/attr
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_test
# Commit cfc9fde0b07c ("ovl: verify upper dentry in
# ovl_remove_and_whiteout()") fixed this issue.
#
-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/preamble
+_begin_fstest auto quick
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
_supported_fs overlay
# truncate(2) should return ETXTBSY, not other errno nor segfault
#
# Commit 03bea6040932 ("ovl: get_write_access() in truncate") fixed this issue.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup
-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
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
#
# This is fixed by "ovl: don't copy up opaqueness".
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# Use non-default scratch underlying overlay dirs, we need to check
#
# SGID bit inheritance over whiteout.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick whiteout
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# - process B writes new data to file F
# - process A reads old data from file F
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "open"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
# Create our test files.
_scratch_mount
-
#
# open file for read (rofd)
# open file for write (rwfd)
# and if inode numbers persist after rename, drop caches and
# mount cycle.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup redirect
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# Require redirect_dir for renaming a merge directory
_require_scratch_feature redirect_dir
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
# Create our test files.
# - modify A to trigger copy up
# - file A is no longer a hardlink of file B
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup hardlink
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_feature index
_require_test_program "t_dir_type"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
# Create 2 hardlinked files in lower
echo "zero" >> $lowerdir/foo
ln $lowerdir/foo $lowerdir/bar
-
# Record inode numbers in format <ino> <nlink>
function record_ino_nlink()
{
# Enable overlay index feature to prevent breaking hardlinks on copy up
_scratch_mount -o index=on
-
rm -f $tmp.*
foo=$SCRATCH_MNT/foo
#
# Run fsstress on lower dir and top dir at the same time
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto stress
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch_nocheck
# ovl: override creds with the ones from the superblock mounter
# Testing ovl copyup/namespace/cred issue.
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick copyup perms
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
require_unshare() {
#
# Test concurrent copy up
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# This reproducer was originally written by
# Miklos Szeredi <mszeredi@redhat.com>
#
-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
+. ./common/preamble
+_begin_fstest auto quick mount nested
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This reproducer was originally written by
# Miklos Szeredi <mszeredi@redhat.com>
#
-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/preamble
+_begin_fstest auto quick attr
+
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This reproducer was originally written by
# Miklos Szeredi <mszeredi@redhat.com>
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick mount
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This reproducer was originally written by
# Miklos Szeredi <mszeredi@redhat.com>
#
-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
+. ./common/preamble
+_begin_fstest auto quick attr
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This reproducer was originally written by
# Miklos Szeredi <mszeredi@redhat.com>
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto attr quick
-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
+# Import common functions.
. ./common/attr
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This reproducer was originally written by
# Miklos Szeredi <mszeredi@redhat.com>
#
-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
+. ./common/preamble
+_begin_fstest auto quick perms
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This reproducer was originally written by
# Miklos Szeredi <mszeredi@redhat.com>
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto copyup quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This reproducer was originally written by
# Miklos Szeredi <mszeredi@redhat.com>
#
-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
+. ./common/preamble
+_begin_fstest auto quick nested
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# fail to prepare immutable/append-only directories on the overlay
# mount path.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick perms
-here=`pwd`
timmutable=$here/src/t_immutable
upperdir=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
$timmutable -r $upperdir/t_immutable &> /dev/null
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs overlay
# and remount overlay. This may lead to whiteouts exposure and
# rmdir failure.
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick whiteout
# create test directory and test file, mount overlayfs and remove
# testfile to create a whiteout in upper dir.
$UMOUNT_PROG $SCRATCH_MNT
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch_nocheck
# should end up being upper hardlinks and both metadata changes should be
# applied.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup hardlink
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# nlink of overlay inode should account for the union of lower and upper
# hardlinks.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup hardlink
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# With overlayfs indexed copy up and without the fix, the test triggers
# WARN_ON(inode->i_nlink == 0) in drop_link().
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup hardlink
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# - No upper dir
# - Failure to create work dir
#
-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
+. ./common/preamble
+_begin_fstest auto quick mount
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# Use non-default scratch underlying overlay dirs, we need to check
# - Upper dir is in-use by another overlay mount
# - Work dir is in-use by another overlay mount
#
-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
+. ./common/preamble
+_begin_fstest auto quick mount
+# Override the default cleanup function.
_cleanup()
{
cd /
$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# Use non-default scratch underlying overlay dirs, we need to check
#
# Failure to verify lowerdir/upperdir on mount results in ESTALE.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick mount
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# Use non-default scratch underlying overlay dirs, we need to check
#
# Test consistent d_ino numbers for samefs setup.
#
-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/preamble
+_begin_fstest auto quick copyup
+
+# Import common functions.
. ./common/filter
. ./common/attr
_require_attrs trusted
_require_test_program "t_dir_type"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
# Create our test files.
# Upstream Commit cd91304e7190 ("ovl: fix relatime for directories")
# fixed this issue.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick atime
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# ioctl on lower layer") return EPERM for this case to avoid
# this issue.
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# This is a variant of overlay/038 to test consistent d_ino numbers
# for non-samefs setup.
#
-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/preamble
+_begin_fstest auto quick copyup nonsamefs
+
+# Import common functions.
. ./common/filter
. ./common/attr
_require_attrs trusted
_require_test_program "t_dir_type"
-rm -f $seqres.full
-
lowerdir=$OVL_BASE_TEST_DIR/$seq-ovl-lower
rm -rf $lowerdir
mkdir $lowerdir
# This test verifies that behavior is sane after creating lower hardlinks
# for copied up files while overlayfs is offline.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-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/preamble
+_begin_fstest auto quick copyup hardlink
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
_supported_fs overlay
# and if inode numbers persist after rename, drop caches and
# mount cycle.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup nonsamefs
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# Require redirect_dir for renaming a merge directory
_require_scratch_feature redirect_dir
-rm -f $seqres.full
-
lowerdir=$OVL_BASE_TEST_DIR/$seq-ovl-lower
rm -rf $lowerdir
mkdir $lowerdir
# - modify A to trigger copy up
# - file A is no longer a hardlink of file B
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup hardlink nonsamefs
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_feature index
_require_test_program "t_dir_type"
-rm -f $seqres.full
-
# Record inode numbers in format <ino> <nlink>
function record_ino_nlink()
{
#
# Test fsck.overlay how to deal with whiteouts in overlayfs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick fsck
-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
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch_nocheck
#
# Test fsck.overlay how to deal with redirect xattr in overlayfs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick fsck
-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
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch_nocheck
# - unlink A and mount cycle
# - check that B still contains the modified data
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup hardlink
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_scratch_feature index
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
# Create 2 hardlinked files in lower
echo "zero" >> $lowerdir/foo
ln $lowerdir/foo $lowerdir/bar
-
# Enable overlay index feature to prevent breaking hardlinks on copy up
_scratch_mount -o index=on
-
rm -f $tmp.*
foo=$SCRATCH_MNT/foo
# hardlinks. Orphan index inodes with union nlink 0 should be cleaned on
# mount.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup hardlink
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# The check for multiply redirected dir was a by-product of kernel
# commit 31747eda41ef ("ovl: hash directory inodes for fsnotify")
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick copyup redirect
# Rename lower dir to create a redirected upper dir and
# touch lower file to create copy up with origin xattr
$UMOUNT_PROG $SCRATCH_MNT
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch_nocheck
# This test requires and enables overlayfs NFS export support.
# NFS export support depends on and requires overlayfs index feature.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup hardlink exportfs
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# This test requires and enables overlayfs NFS export support.
# NFS export support depends on and requires overlayfs index feature.
#
-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
+. ./common/preamble
+_begin_fstest auto quick copyup hardlink exportfs nonsamefs
+# Override the default cleanup function.
_cleanup()
{
cd /
$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# dir rename support (redirect_dir).
# NFS export support depends on and requires overlayfs index feature.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup redirect exportfs
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# dir rename support (redirect_dir).
# NFS export support depends on and requires overlayfs index feature.
#
-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
+. ./common/preamble
+_begin_fstest auto quick copyup redirect exportfs nonsamefs
+# Override the default cleanup function.
_cleanup()
{
cd /
$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# Regression test for kernel commit 2ca3c148a062 ("ovl: check lower ancestry
# on encode of lower dir file handle")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup redirect exportfs
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# Regression test for kernel commit 2ca3c148a062 ("ovl: check lower ancestry
# on encode of lower dir file handle")
#
-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
+. ./common/preamble
+_begin_fstest auto quick copyup redirect exportfs nonsamefs
+# Override the default cleanup function.
_cleanup()
{
cd /
$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Test fsck.overlay how to deal with impure xattr in overlayfs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick fsck
-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
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch_nocheck
# "redirect" directory in upper should merge with lower1:/a/b/c/ and
# lower0:/a/b/d/, despite lower1:/a/b/ being opaque.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick redirect
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# We use non-default scratch underlying overlay dirs, we need to check
# This test requires and enables overlayfs NFS export support.
# NFS export support depends on and requires overlayfs index feature.
#
-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
+. ./common/preamble
+_begin_fstest auto quick exportfs
+# Override the default cleanup function.
_cleanup()
{
$KILLALL_PROG -9 open_by_handle >/dev/null 2>&1
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# The check for multiply referenced origin was a by-product of kernel
# commit 31747eda41ef ("ovl: hash directory inodes for fsnotify")
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick copyup
# Rename lower file to create copy up with origin xattr
create_origin_ref()
$UMOUNT_PROG $SCRATCH_MNT
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch_nocheck
#
# Test metadata only copy up functionality.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick metacopy
-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
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# We use non-default scratch underlying overlay dirs, we need to check
# - process B writes new data to shared mmap
# - process A reads old data from shared mmap
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest posix copyup
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "open"
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
# Create our test files.
_scratch_mount
-
filter_xfs_io_mmap()
{
# filter out these lines:
# commit 8b58924ad55c ("ovl: lookup in inode cache first when decoding
# lower file handle").
#
-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
+. ./common/preamble
+_begin_fstest auto quick exportfs
+# Override the default cleanup function.
_cleanup()
{
cd /
$UMOUNT_PROG $lowertestdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# The following kernel commit fixed the kernel crash: 5e1275808630 ("ovl: check
# whiteout in ovl_create_over_whiteout()")
#
-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/preamble
+_begin_fstest auto quick whiteout
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
_supported_fs overlay
#
# Make sure CAP_SETUID is not cleared over file copy up.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# and its followup fix commit:
# 0be0bfd2de9d "ovl: fix regression caused by overlapping layers detection"
#
-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
+. ./common/preamble
+_begin_fstest auto quick mount
+# Override the default cleanup function.
_cleanup()
{
cd /
$UMOUNT_PROG $mnt2 2>/dev/null
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# Use non-default scratch underlying overlay dirs, we need to check
#
# Test overlayfs copy-up function for variant sparse files.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup
-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
+# Import common functions..
. ./common/filter
-# remove previous $seqres.full before test.
-rm -f $seqres.full
-
# real QA test starts here.
# Modify as appropriate.
done
echo >>$seqres.full
-
# Create test file with many random holes(hole size is between 1M and 5M),
# total file size is 100M.
# This is a regression test for kernel commit:
# 9c6d8f13e9da ovl: fix corner case of non-unique st_dev;st_ino
#
-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/preamble
+_begin_fstest auto quick copyup nonsamefs
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
_supported_fs overlay
# because name_to_handle_at() syscall does not support requesting connectable
# file handles.
#
-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
+. ./common/preamble
+_begin_fstest auto quick copyup hardlink exportfs nested
+# Override the default cleanup function.
_cleanup()
{
cd /
$UMOUNT_PROG $mnt2 2>/dev/null
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# because name_to_handle_at() syscall does not support requesting connectable
# file handles.
#
-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
+. ./common/preamble
+_begin_fstest auto quick copyup hardlink exportfs nested nonsamefs
+# Override the default cleanup function.
_cleanup()
{
cd /
$UMOUNT_PROG $mnt2 2>/dev/null
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# consistent with st_ino and that inode numbers persist after rename to
# new parent, drop caches and mount cycle.
#
-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
+. ./common/preamble
+_begin_fstest auto quick copyup redirect nested
+# Override the default cleanup function.
_cleanup()
{
cd /
[ -z "$loopdev" ] || _destroy_loop_device $loopdev
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
done
}
-rm -f $seqres.full
-
create_dirs
create_test_files $lowerdir
# its st_ino/d_ino/i_ino values are not consistent, so test only non-dir
# in this test.
#
-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
+. ./common/preamble
+_begin_fstest auto quick copyup redirect nested nonsamefs
+# Override the default cleanup function.
_cleanup()
{
cd /
[ -z "$loopdev" ] || _destroy_loop_device $loopdev
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
done
}
-rm -f $seqres.full
-
create_dirs
create_test_files $lowerdir
# Without the fix, the test triggers
# WARN_ON(inode->i_nlink == 0) in drop_link().
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copyup hardlink
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# one inode in upper layer, without this feature every whiteout object
# will consume one inode in upper layer.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick whiteout
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# Fixed by kernel commit 9aafc1b01873:
# ovl: potential crash in ovl_fid_to_fh()
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick exportfs dangerous
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# be enabled when index is disabled
_require_scratch_overlay_features index nfs_export
-rm -f $seqres.full
-
_scratch_mkfs
_scratch_mount -o "index=on,nfs_export=on"
# the test area in lower layer before running the t_immutable test on
# the overlayfs mount.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick perms
-here=`pwd`
timmutable=$here/src/t_immutable
lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER
upperdir=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
# -r will fail to remove test dirs, because we added subdirs
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs overlay
# This is a regression test for the fix commit b854cc659dcb ("ovl: avoid
# deadlock on directory ioctl")
#
-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
+. ./common/preamble
+_begin_fstest auto quick perms dangerous
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch
# This is a regression test for kernel commit 65cd913ec9d9
# ("ovl: invalidate readdir cache on changes to dir with origin")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick dir
-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
+# Import common functions.
. ./common/filter
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
_require_scratch_nocheck
# Run unionmount testsuite to verify correctness
# with single lower layer on same fs as upper
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick union samefs
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# Run unionmount testsuite to verify correctness
# with single lower layer not on same fs as upper
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick union nonsamefs
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# with single lower layer not on same fs as upper
# with xino enabled
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick union nonsamefs xino
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# Run unionmount testsuite to verify correctness
# with multi lower layers on same fs as upper
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto union rotate samefs
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# Run unionmount testsuite to verify correctness
# with multi lower layers, lowermost on unique fs
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto union rotate nonsamefs
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# with multi lower layers, lowermost on unique fs,
# with xino enabled
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto union rotate nonsamefs xino
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# with multi lower layers, some layers on unique fs,
# one layer is on tmpfs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto union rotate nonsamefs
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# with multi lower layers, some layers on unique fs,
# one layer is on tmpfs with xino enabled.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto union rotate nonsamefs xino
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# with multi lower layers, all layers on unique fs,
# some layers are on tmpfs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto union rotate nonsamefs
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# with multi lower layers, all layers on unique fs,
# some layers are on tmpfs with xino enabled.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto union rotate nonsamefs xino
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# with single lower overlay layer, whose layers are
# on same fs
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick union nested samefs
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# on same fs
# with xino enabled (xino overflow not expected)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick union nested samefs xino
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# with single lower overlay layer, whose layers are
# not on same fs
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick union nested nonsamefs
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# not on same fs
# with xino enabled (expected xino overflows)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick union nested nonsamefs xino
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# with multi lower layers, lowermost is an overlay layer,
# whose layers are on same fs
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto union rotate nested samefs
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# whose layers are on same fs
# with xino enabled (xino overflow not expected)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto union rotate nested samefs xino
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# with multi lower layers, lowermost is an overlay layer,
# whose layers are not on same fs
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto union rotate nested nonsamefs
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
# whose layers are not on same fs
# with xino enabled (expected xino overflows)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto union rotate nested nonsamefs xino
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_unionmount_testsuite_cleanup; exit \$status" 0 1 2 3 15
+_register_cleanup "_unionmount_testsuite_cleanup"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs overlay
#
# Buffered random write performance test.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto
-here=`pwd`
-tmp=/tmp/$$
fio_config=$tmp.fio
fio_results=$tmp.json
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/perf
_require_block_device $SCRATCH_DEV
_require_fio_results
-rm -f $seqres.full
-
_size=$((16 * $LOAD_FACTOR))
cat >$fio_config <<EOF
[t1]
#
# This test is motivated by a bug found in btrfs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto metadata quick log
+# Override the default cleanup function.
_cleanup()
{
_cleanup_flakey
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmflakey
. ./common/attr
_require_dm_target flakey
_require_attrs
-rm -f $seqres.full
-
_scratch_mkfs >> $seqres.full 2>&1
_require_metadata_journaling $SCRATCH_DEV
_init_flakey
#
# cross check mkfs detection of foreign filesystems
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest mkfs auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-rm -f $seqres.full
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Test that filesystem sends discard requests only on free blocks
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-. ./common/rc
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+. ./common/preamble
+_begin_fstest auto trim
_supported_fs ext4 xfs btrfs
_require_test
[ "$FSTYP" = "btrfs" ] && _require_btrfs_command inspect-internal dump-super
[ "$FSTYP" = "btrfs" ] && _require_btrfs_command inspect-internal dump-tree
+# Override the default cleanup function.
_cleanup()
{
$UMOUNT_PROG $loop_dev &> /dev/null
rm $tmp_file
}
-here=`pwd`
tmp=`mktemp -d`
img_file=$TEST_DIR/$$.fs
# This tests mkfs_udf/mkudffs and the device detection code
# Modified from UDFQA test 031.
#
-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
+. ./common/preamble
+_begin_fstest udf
+# Override the default cleanup function.
_cleanup()
{
rm -f $tmp.*
cd /
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# write the value 0, each bit and finally the entry beyond the maximum legal
# value. Also makes sure a core write and hex input still work.
#
-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.*
-}
+. ./common/preamble
+_begin_fstest db auto quick
_do_bit_test()
{
echo
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# for further explanation. (NB: while the commit log was good, the
# patch had a bug which was subsequently fixed)
#
-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/preamble
+_begin_fstest auto quick growfs
+
+# Import common functions.
. ./common/filter
# Modify as appropriate.
# So we can explicitly turn it _off_:
_require_xfs_mkfs_crc
-rm -f $seqres.full
-
_scratch_mkfs_xfs -m crc=0 -d size=128m >> $seqres.full 2>&1 || _fail "mkfs failed"
# Scribble past a couple V4 secondary superblocks to populate sb_crc
#
# exercise xfs_db bug #784078
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest db auto quick
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-tmp=/tmp/$$
-here=`pwd`
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs xfs
#
# exercise xfs_db bug #789674 and other freesp functionality
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest db auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0
+# Override the default cleanup function.
_cleanup()
{
_scratch_unmount
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
_populate_scratch()
{
_scratch_mount # and then remount
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_no_large_scratch_dev
-rm -f $seqres.full
-
_populate_scratch
eval `$DF_PROG -P --block-size=512 $SCRATCH_MNT 2>&1 \
# inadvertently caused primary SB CRC failures to not error out, this
# is a regression test for that fix.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
# Modify as appropriate.
_require_scratch_nocheck
_require_xfs_mkfs_crc
-rm -f $seqres.full
-
_scratch_mkfs_xfs -m crc=1 >> $seqres.full 2>&1 || _fail "mkfs failed"
# Zap the crc. xfs_db updates the CRC post-write, so poke it directly
# Test xfs' "fail at unmount" error handling configuration. Stop
# XFS from retrying to writeback forever at unmount.
#
-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
+. ./common/preamble
+_begin_fstest auto quick mount eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmerror
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
_require_scratch
#
# Test to verify Q_XQUOTARM functionality.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota quick
-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
+# Import common functions.
. ./common/filter
. ./common/quota
_require_scratch
_require_xfs_quota
-rm -f $seqres.full
-
_scratch_mkfs_xfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
. $tmp.mkfs
_scratch_xfs_db -c "inode $QINO_2" -c "p core.nblocks"
}
-
# Test user and group first
_qmount_option "uquota,gquota"
_qmount
#
# randholes test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw ioctl auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
pgsize=`$here/src/feature -s`
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
rm -f $tmp.*
-e "s/-l .* -c/-l FSIZE -c/g"
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_do_test()
_supported_fs xfs
_require_test
-rm -f $seqres.full
-
# Note on special numbers here.
#
# We are trying to create roughly 50 or 100 holes in a file
#
# XFS allocator test (preallocation - allocp, resvsp ,etc)
#
-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
+. ./common/preamble
+_begin_fstest rw ioctl auto prealloc quick
+# Override the default cleanup function.
_cleanup()
{
echo "*** unmount"
fi
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# corruptions and verify that xfs_repair detects and repairs the filesystem to
# a consistent state.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/repair
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
_sparse_inode_populate()
{
_require_xfs_mkfs_finobt
_require_xfs_finobt
-rm -f $seqres.full
-
_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _filter_mkfs 2>$seqres.full
# sparsely populate the fs such that we create records with free inodes
# include a variety of fs operations, freeze the filesystem and verify that
# there are no oustanding reservations against the log.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto freeze log metadata quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
+# Override the default cleanup function.
_cleanup()
{
$KILLALL_PROG -9 fsstress 2>/dev/null
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# Use the information exported by XFS to sysfs to determine whether the log has
# active reservations after a filesystem freeze.
_require_xfs_sysfs $(_short_dev $TEST_DEV)/log
_require_command "$KILLALL_PROG" killall
-rm -f $seqres.full
-
echo "Silence is golden."
_scratch_mkfs_xfs >> $seqres.full 2>&1
#
# holes
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
ls -l $1 | $AWK_PROG '{print " filesize = " $5}'
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_do_test()
_supported_fs xfs
_require_test
-rm -f $seqres.full
-
# small & fairly dense
_do_test 1 "-l 40960000 -b 40960 -i 10 -c 1" 100
# and modifies a sparsely allocated set of inodes in combination with an
# fsstress workload.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto metadata stress
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
+# Override the default cleanup function.
_cleanup()
{
$KILLALL_PROG -9 fsstress 2>/dev/null
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
filter_enospc() {
sed -e '/^.*No space left on device.*/d'
_require_xfs_finobt
_require_command "$KILLALL_PROG" killall
-rm -f $seqres.full
-
_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | \
_filter_mkfs 2>> $seqres.full
_scratch_mount
# new writers reclaim said preallocations rather than prematurely fail with
# ENOSPC/EDQUOT.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto enospc quick quota
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# Create a file using a repeated open, extending write and close pattern. This
# causes the preallocation to persist after the file is closed. Preallocation
_require_user
_require_group
-rm -f $seqres.full
-
echo "Silence is golden."
_scratch_mkfs_xfs >> $seqres.full 2>&1
# Regression test for
# xfs: allow inode allocations in post-growfs disk space
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto enospc growfs
create_file()
{
done
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_fs_space $SCRATCH_MNT 131072
_scratch_unmount
-rm -f $seqres.full
-
_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw
cat $tmp.mkfs.raw | _filter_mkfs >$seqres.full 2>$tmp.mkfs
# get original data blocks number and agcount
# if it changes, we assume the log is writing over it
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1
-
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest rw auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
_fail "!!! block $2 corrupted!"
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
# real QA test starts here
_supported_fs xfs
-rm -f $seqres.full
-
_require_scratch
_init
#
# test remount ro - pv 795642
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest mount auto quick stress
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
+_register_cleanup "_cleanup; rm -f $tmp.*"
+# Override the default cleanup function.
_cleanup()
{
echo "*** unmount"
_scratch_unmount 2>/dev/null
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
echo "*** init FS"
-rm -f $seqres.full
_scratch_unmount >/dev/null 2>&1
echo "*** MKFS ***" >>$seqres.full
echo "" >>$seqres.full
echo "*** done"
# happy exit
-rm -f $seqres.full
status=0
exit 0
# xfs_logprint test - test v2 logs of different LR sizes
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest deprecated # log logprint v2log
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/log
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
_scratch_unmount 2>/dev/null
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs xfs
# prelim
-rm -f $seqres.full $tmp.*
_require_scratch
_require_v2log
#
# mkfs protofile test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest mkfs auto quick
-here=`pwd`
-tmp=/tmp/$$
seqfull="$seqres.full"
-status=1 # failure is the default!
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
+# Override the default cleanup function.
_cleanup()
{
echo "*** unmount"
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
_full()
{
# Regression test for xfsprogs commit
# 7f2d6b8 xfs_repair: avoid segfault if reporting progress early in repair
#
-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
+. ./common/preamble
+_begin_fstest auto repair
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $fsfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# xfs_db type attr test (pv 797508 linux-xfs & IRIX)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest db attr auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
+# Override the default cleanup function.
_cleanup()
{
echo "*** unmount"
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
_attr()
{
_require_scratch
_require_attrs
-rm -f $seqres.full
_scratch_unmount >/dev/null 2>&1
echo "*** mkfs"
# Use fsstress to create a directory structure with a mix of files
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl tape
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-. ./common/rc
. ./common/dump
# real QA test starts here
# files with data created by src/fill.
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl tape
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# Test out incremental dumps
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl tape
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# Test dump/restore using -m option (min strategy)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl tape
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# Test xfsdump/xfsrestore to a dump file (as opposed to a tape)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# Test out "xfsdump | xfsrestore"
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# To test out xfsinvutil
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# exercise mkfs log (internal/external) zeroing
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest mkfs logprint log auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
filter_logprint()
# exercise xfs_repair repairing broken filesystems
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest repair auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/repair
. ./common/quota
# exercise xfs_repair - ensure repeated use doesn't corrupt
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest repair mkfs auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-rm -f $seqres.full
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/repair
. ./common/filter
# Test xfs_copy for all filesystem sector size / block size
# combinations possible on this platform.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest copy auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs xfs
_require_test_program "feature"
_require_xfs_copy
-rm -f $seqres.full
-
SECTORSIZE=`blockdev --getss $SCRATCH_DEV`
PAGESIZE=`$here/src/feature -s`
IMGFILE=$TEST_DIR/${seq}_copy.img
# exercise xfs_repair repairing broken filesystems (root inodes)
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest repair auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/repair
. ./common/quota
#
# pv 801241 - check for reference leaks from the *handle xfsctls
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest other auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
echo "*** unmount"
_scratch_unmount 2>/dev/null
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
echo "*** init FS"
-rm -f $seqres.full
_scratch_unmount >/dev/null 2>&1
echo "*** MKFS ***" >>$seqres.full
echo "" >>$seqres.full
# Test doing multiple dumps to tape and restoring the 2nd one
#
seqfull=$0
-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
+. ./common/preamble
+_begin_fstest dump ioctl tape auto
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
# Test xfsdump/restore minrmt to a remote IRIX tape
#
seqfull=$0
-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
+. ./common/preamble
+_begin_fstest dump ioctl remote tape
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# Test xfsdump/restore minrmt to a remote linux tape
#
-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
+. ./common/preamble
+_begin_fstest dump ioctl remote tape
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# Test xfsdump/restore to a remote linux tape
#
-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
+. ./common/preamble
+_begin_fstest dump ioctl remote tape
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
# Test xfsdump/restore to a remote IRIX tape
#
seqfull=$0
-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
+. ./common/preamble
+_begin_fstest dump ioctl remote tape
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
# is no functional need for anyone to actually run this test to confirm
# proper XFS functionalilty, this is an xfsprogs maintainer test.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest other auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
[ -z "$KWORKAREA" ] && \
#
set +x
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest growfs ioctl auto
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount
rm -f $tmp.*
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
}
_do_die_on_error=message_only
-rm -f $seqres.full
agsize=32
echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... "
_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 >/dev/null || _fail "mkfs failed"
#
set +x
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest fsr ioctl auto
+# Override the default cleanup function.
_cleanup()
{
_scratch_unmount
rm -f $tmp.*
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# - run xfs_fsr on the filesystem
# - check checksums for remaining files
-rm -f $seqres.full
_do_die_on_error=message_only
echo -n "Make a 48 megabyte filesystem on SCRATCH_DEV and mount... "
# rebuilt from the on-tape inventory.
#
seqfull=$0
-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
+. ./common/preamble
+_begin_fstest dump ioctl tape
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# external log uuid/format tests (TODO - version 2 log format)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest other auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# test mount of two FSes with identical UUID and mount with unknown option
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest other auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_get_existing_uuid()
#
# check on symlinks permissions
#
-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
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# invutil with interactive responses
#
-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
+. ./common/preamble
+_begin_fstest dump ioctl auto
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# test return codes from xfsctl on bad userspace address
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest other auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
# real QA test starts here
_supported_fs xfs
_require_test
#
# XFS on loop test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
fi
}
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_loop
_require_extra_fs ext2
-rm -f $seqres.full
-
echo "(dev=$SCRATCH_DEV, mount=$SCRATCH_MNT)" >> $seqres.full
echo "" >> $seqres.full
# Exercises basic XFS quota functionality
# uquota, gquota, uqnoenforce, gqnoenforce, pquota, pqnoenforce
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest quota auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs xfs
# on I/O failures during log recovery. Note that this test is dangerous as it
# causes BUG() errors or a panic.
#
-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
+. ./common/preamble
+_begin_fstest shutdown auto log metadata
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount > /dev/null 2>&1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dmflakey
# Modify as appropriate.
# MOUNT_OPTIONS can be set to gquota to test group quota,
# defaults to uquota if MOUNT_OPTIONS is not set.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest quota db auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs xfs
-rm -f $seqres.full
-
_require_scratch
_require_xfs_quota
_require_nobody
# Due to bugs here and there, we sometimes matched on partial
# strings with those names, and threw off xfs_repair.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest attr acl repair quick auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
# real QA test starts here
_supported_fs xfs
#
# Exercise the xfs_io inode command
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Test xfsdump/restore to a remote IRIX tape using RMT user
#
seqfull=$0
-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
+. ./common/preamble
+_begin_fstest dump ioctl remote tape
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
# Test xfsdump/xfsrestore to a dump file (as opposed to a tape)
# and test restoring various permissions/modes
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# Note that this test requires a DEBUG mode kernel.
#
-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
+. ./common/preamble
+_begin_fstest auto log
+# Override the default cleanup function.
_cleanup()
{
cd /
wait > /dev/null 2>&1
}
-rm -f $seqres.full
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/inject
# real QA test starts here
#
# Ensure that xfs_db fuzz command works as advertised.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick fuzzers
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/fuzzy
#
# Test multi-stream xfsdump/xfsrestore.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# Test multi-stream xfsdump and restoring one stream at a time.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# Test restoring a dump created in IRIX/XFS
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
# Test under various inode counts, inobt record layouts and bulkstat batch
# sizes.
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto ioctl quick
# print the number of inodes counted by bulkstat
_bstat_count()
_bstat_count 1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_require_scratch
_supported_fs xfs
-rm -f $seqres.full
-
DIRCOUNT=8
INOCOUNT=$((2048 / DIRCOUNT))
#
# xfsdump/xfsrestore with EAs
#
-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
+. ./common/preamble
+_begin_fstest dump attr auto quick
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dump
. ./common/attr
#
# test multilevel dump and restores with hardlinks
#
-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
+. ./common/preamble
+_begin_fstest dump auto
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dump
# directories".
# Do different operations for each level.
#
-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
+. ./common/preamble
+_begin_fstest dump auto
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dump
. ./common/quota
#
# Test dumping of large files
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dump
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
#
# Test out acl/dacls which fit in shortform in the inode
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest acl attr auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
# c7cb51d xfs: fix error handling at xfs_inumbers
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto stress dump
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-. ./common/rc
. ./common/dump
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
# Determine whether the extent size hint can be set on directories
# with allocated extents correctly.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest ioctl auto quick
-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
+# Import common functions.
. ./common/filter
. ./common/punch
# verify it repairs the fs correctly. We explicitly detect a brute force scan
# and abort the repair to save time in the failure case.
#
-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
+. ./common/preamble
+_begin_fstest auto quick repair
+# Override the default cleanup function.
_cleanup()
{
cd /
cat $tmp.repair | _filter_repair
}
-rm -f $seqres.full
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/repair
#
# Exercise IO at large file offsets.
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-rm -f $seqres.full
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest rw auto
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
_scratch_unmount 2>/dev/null
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
bitsperlong=`$here/src/feature -w`
#
# Check some unwritten extent boundary conditions
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto prealloc quick
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
}
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_xfs_io_command "falloc"
-rm -f $seqres.full
_scratch_unmount >/dev/null 2>&1
_scratch_mkfs_xfs >/dev/null || _fail "mkfs failed"
#
# Test xfs_copy
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest copy auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
# don't put fs images in /tmp
imgs=$TEST_DIR/$$
+# Override the default cleanup function.
_cleanup()
{
cd /
[ -d $imgs.source_dir ] && rm -rf $imgs.source_dir
rm -f $imgs.* $tmp.* /var/tmp/xfs_copy.log.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
_filter_copy()
{
_require_scratch
_require_loop
-rm -f $seqres.full
-
_scratch_mkfs_xfs -dsize=41m,agcount=2 >>$seqres.full 2>&1
_scratch_mount
# of the new extent will be larger than MAXEXTLEN. This will later cause
# the bmbt leaf to have an entry whose length is set to zero block count.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest quick auto prealloc rw
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $LOOP_FILE
}
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs xfs
-rm -f $seqres.full
-
_require_test
_require_xfs_io_command "falloc"
# Commit bbe051c8 disallows ro->rw remount on norecovery mount
# This test makes sure the behavior is correct.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick mount
-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
+# Import common functions.
. ./common/filter
. ./common/quota
# space, allocates inodes to ENOSPC and then verifies that most of the available
# inodes (.i.e., free space) have been consumed.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto enospc punch
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
_consume_freesp()
{
_require_xfs_io_command "fpunch"
_require_xfs_sparse_inodes
-rm -f $seqres.full
-
_scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
_filter_mkfs > /dev/null 2> $tmp.mkfs
. $tmp.mkfs # for isize
# matches all the existing metadata) to a new superblock location.
# Exercise some of that behavior.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick copy
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
$XFS_DB_PROG -r -c version $FS | grep -q META_UUID
}
-rm -f $seqres.full
-
_scratch_mkfs_xfs -m crc=1 >> $seqres.full 2>&1 || _fail "mkfs failed"
ORIG_UUID=`_scratch_xfs_db -c "uuid" | awk '{print $NF}'`
#
# Check several growfs corner cases
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest growfs auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1
-
-trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
+_register_cleanup "_cleanup; rm -f $tmp.*"
+# Override the default cleanup function.
_cleanup()
{
cd /
rmdir $LOOP_MNT
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# loop devices are available in Linux only
# real QA test starts here
-rm -f $seqres.full
-
echo "*** create loop mount point"
rmdir $LOOP_MNT 2>/dev/null
mkdir -p $LOOP_MNT || _fail "cannot create loopback mount point"
# Test that log recovery succeeds with a different log buffer size from when the
# filesystem crashed.
#
-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
+. ./common/preamble
+_begin_fstest shutdown auto log quick
+# Override the default cleanup function.
_cleanup()
{
cd /
wait > /dev/null 2>&1
}
-rm -f $seqres.full
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/log
# real QA test starts here
#
# rwtest (iogen|doio)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw ioctl
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
+# Override the default cleanup function.
_cleanup()
{
cd /
#
# To test out logprint with quotas
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest deprecated # log logprint quota
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/log
. ./common/quota
# real QA test starts here
_supported_fs xfs
+# Override the default cleanup function.
_cleanup()
{
cd /
echo "*** unmount"
_scratch_unmount 2>/dev/null
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# prelim
-rm -f $seqres.full $tmp.*
_require_scratch
_require_xfs_quota
_require_v2log
# Test out the v2 stripe logs with logprint
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest deprecated # log logprint v2log
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/log
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
_scratch_unmount 2>/dev/null
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs xfs
# prelim
-rm -f $seqres.full $tmp.*
_require_scratch
_require_v2log
# the kernel reacts, how xfs_repair fares in fixing the mess, and then
# try more kernel accesses to see if it really fixed things.
#
-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
+. ./common/preamble
+_begin_fstest dangerous_fuzzers punch
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
return 1
}
-rm -f $seqres.full
# This test will corrupt fs intentionally, so there will be WARNINGs
# in dmesg as expected
_disable_dmesg_check
# Exercises unwritten extent reads and writes, looking
# for data corruption (zeroes read) near the end of file.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest ioctl rw auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_filter_resv()
# Create and populate an XFS filesystem, corrupt a superblock, then see how
# the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_populate_commands
_require_xfs_db_blocktrash_z_command
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an XFS filesystem, corrupt an AGF, then see how
# the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an XFS filesystem, corrupt the AGI, then see how
# the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an XFS filesystem, corrupt the AGFL, then see how
# the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an XFS filesystem, corrupt the bnobt, then see how
# the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
#
# Exercise IO on the realtime device (direct, buffered, mmapd)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto realtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# Create and populate an XFS filesystem, corrupt the cntbt, then see how
# the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
#
# Make sure that we can mount inode64 filesystems
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest other auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# Create and populate an XFS filesystem, corrupt the inobt, then see how
# the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
#
# Exercising the inheritable realtime inode bit.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest metadata dir ioctl auto realtime
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Test upgrading the XFS log to v2
#
-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/preamble
+_begin_fstest log v2log auto
+
+# Import common functions.
. ./common/filter
. ./common/log
# ensure pv#920679 is addressed
#
seqfull=$0
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest mkfs v2log auto quick
-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
+# Import common functions.
. ./common/filter
. ./common/log
}
# real QA test starts here
-rm -f $seqres.full
# Modify as appropriate.
_supported_fs xfs
# Create and populate an XFS filesystem, corrupt the finobt, then see how
# the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an XFS filesystem, corrupt the journal, then see how
# the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
# Create and populate an XFS filesystem, corrupt a block directory, then see
# how the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
# Create and populate an XFS filesystem, corrupt a leaf directory's data
# extent, then see how the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
# Create and populate an XFS filesystem, corrupt a leaf directory's leaf
# extent, then see how the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
# Create and populate an XFS filesystem, corrupt a node directory's data
# extent, then see how the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
#
# Exercise the XFS nosymlinks inode flag
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest metadata dir ioctl auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_create_scratch()
#
# XFS online growfs-while-allocating tests (data subvol variant)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest growfs ioctl prealloc auto stress
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_create_scratch()
_require_scratch
_require_xfs_io_command "falloc"
-rm -f $seqres.full
_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
. $tmp.mkfs # extract blocksize and data size for scratch device
# Create and populate an XFS filesystem, corrupt a node directory's leaf
# extent, then see how the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
# Use of "sync" mount option here is an attempt to get deterministic
# allocator behaviour.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
_require_scratch
# Use of "sync" mount option here is an attempt to get deterministic
# allocator behaviour.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest quota
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
#
# Simple quota accounting test for direct/buffered/mmap IO.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest quota auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
#
# ENOSPC deadlock case from Asano Masahiro.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest metadata auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# real QA test starts here
_scratch_mkfs_xfs >> $seqres.full
_scratch_mount
-rm -f $seqres.full
# see if faststart is possible (and requested)
files=2000
#
# Incorrect dir2 freetab warning case from Masanori Tsuda.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest repair auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Infinite xfs_bulkstat bad-inode loop case from Roger Willcocks.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest ioctl
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs xfs
_require_scratch
-rm -f $seqres.full
-
[ "$XFS_FSR_PROG" = "" ] && _notrun "xfs_fsr not found"
# real QA test starts here
# Create and populate an XFS filesystem, corrupt a node directory's freeindex
# extent, then see how the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
# Create and populate an XFS filesystem, corrupt a btree directory's data
# extent, then see how the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
# In particular, make sure that fcollapse works for rmap when the
# extents on either side of the collapse area are mergeable.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone rmap collapse insert
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
#
# At the end of the test, the scratch device will purposely be in a corrupted
# state, so there is no need for checking that.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick fuzzers
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Test out resetting of sb_qflags when mounting with no quotas after
# having mounted with quotas.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest quota auto quick
-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
+# Import common functions.
. ./common/filter
. ./common/quota
# Create and populate an XFS filesystem, corrupt an inode, then see how
# the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
victimdir="${SCRATCH_MNT}/scratchdir"
echo "+ create scratch fs"
# Fixed upstream by proper nextents counting using
# ip->i_df.if_bytes not ip->i_d.di_nextents in xfs_swap_extent_forks
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick fsr
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
_supported_fs xfs
_require_scratch
# Test out pv#942130
# This can hang when things aren't working
#
-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/preamble
+_begin_fstest log v2log auto freeze
+
+# Import common functions.
. ./common/filter
# real QA test starts here
# Create and populate an XFS filesystem, corrupt the bmbt, then see how
# the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
# are happening.
# See pv#953263.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown log auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/log
# real QA test starts here
_supported_fs xfs
-rm -f $seqres.full
rm -f $tmp.log
_require_scratch
# Keep an eye on some of the xfs type sizes
# Motivation from differing ondisk types for 32 and 64 bit word versions.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest other auto quick clone realtime
# get standard environment
-. ./common/rc
# real QA test starts here
_supported_fs xfs
_require_command "$INDENT_PROG" indent
-rm -f $seqres.full
-
# filter out known changes to xfs type sizes
_type_size_filter()
{
# Create and populate an XFS filesystem, corrupt a long symlink, then see how
# the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
# Create and populate an XFS filesystem, corrupt a block xattr, then see
# how the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
# Create and populate an XFS filesystem, corrupt a leaf xattr's index extent,
# then see how the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
# Create and populate an XFS filesystem, corrupt a leaf xattr's data extent,
# then see how the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
_require_xfs_db_blocktrash_z_command
test -z "${FUZZ_ARGS}" && FUZZ_ARGS="-n 8 -3"
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
#
# Tests xfs_growfs on a reflinked filesystem
#
-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/preamble
+_begin_fstest auto quick clone
+
+# Import common functions.
. ./common/filter
. ./common/reflink
#
# Ensure that xfs_fsr un-reflinks files while defragmenting
#
-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/preamble
+_begin_fstest auto quick clone fsr
+
+# Import common functions.
. ./common/filter
. ./common/reflink
# of a multi-level refcount btree, and that metadump will successfully copy
# said block.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir $metadump_file $TEST_DIR/image
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_loop
_require_scratch_reflink
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
# Create and populate an XFS filesystem, corrupt the refcount btree,
# then see how the kernel and xfs_repair deal with it.
#
-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
+. ./common/preamble
+_begin_fstest fuzzers clone
+# Override the default cleanup function.
_cleanup()
{
cd /
#rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
#
# Ensure that we can't reflink realtime files.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone realtime
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir $metadump_file
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
echo "Format and mount scratch device"
_scratch_mkfs >> $seqres.full
_scratch_mount
#
# Catch inobt/on disk inode free state mismatches on V4 filesystems
#
-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/preamble
+_begin_fstest auto quick
+
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
# So, create this malformed inode and try a buffered append to make
# sure we catch this situation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers
PIDS=""
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_nocheck
_disable_dmesg_check
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
# So, create this malformed inode and try a dio append to make sure we
# catch this situation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers
PIDS=""
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_nocheck
_disable_dmesg_check
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
# correctly for various log stripe unit values. The log is formatted with xfs_db
# and verified with xfs_logprint.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto logprint quick v2log
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-rm -f $seqres.full
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/log
# real QA test starts here
# Let's look, xfs_db, at the inode and its literal area for the
# extents and the attributes
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest attr2
-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
+# Import common functions.
. ./common/filter
. ./common/attr
# put the current LSN behind metadata LSNs and verifies that the kernel and
# xfs_repair detect the problem.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto metadata v2log
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-rm -f $seqres.full
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
#
# Test nesting the 'source' command in xfs_db via -c and interactive.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs xfs
# Try to ENOSPC while expanding the refcntbt by CoWing every block
# of a file that eats the whole AG.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
_xfs_force_bdev data $SCRATCH_MNT
# Try to ENOSPC while expanding the refcntbt by CoWing every other block
# of a file that eats the whole AG.
#
-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
+. ./common/preamble
+_begin_fstest auto clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
blksz=$(_get_file_block_size $SCRATCH_MNT)
#
# Note that this test requires a DEBUG mode kernel.
#
-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
+. ./common/preamble
+_begin_fstest auto log metadata
+# Override the default cleanup function.
_cleanup()
{
cd /
wait > /dev/null 2>&1
}
-rm -f $seqres.full
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/inject
# real QA test starts here
# fixes the bmap record validator so that it will not check the attr fork
# extent mappings of a realtime file against the size of the realtime volume.
-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/preamble
+_begin_fstest auto quick rw attr realtime
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_realtime
-rm -f $seqres.full
-
# Format filesystem with very tiny realtime volume
_scratch_mkfs -r size=256k > $seqres.full
_scratch_mount >> $seqres.full
# This is a regression test for the xfsprogs commit 31409f48 ("mkfs: set
# required parts of the realtime geometry before computing log geometry").
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick realtime mount
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_realtime
-rm -f $seqres.full
-
# Format a tiny filesystem to force minimum log size, then see if it mounts
_scratch_mkfs -r size=1m -d size=100m > $seqres.full
_scratch_mount >> $seqres.full
# regression test for commit 4b8628d57b72 ("xfs: actually bump warning counts
# when we send warnings").
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick quota
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
_require_xfs_quota
_require_scratch
-rm -f $seqres.full
-
exercise() {
_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
cat $tmp.mkfs >>$seqres.full
# for commit 1aecf3734a95 ("xfs: fix chown leaking delalloc quota blocks when
# fssetxattr fails").
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/quota
# real QA test starts here
_require_quota
_require_scratch
-rm -f $seqres.full
-
echo "Format filesystem" | tee -a $seqres.full
_scratch_mkfs > $seqres.full
_qmount_option 'prjquota'
# the end of the rtbitmap file. When this happens, xfs triggers a verifier
# error and returns EFSCORRUPTED.
-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/preamble
+_begin_fstest auto quick rw realtime
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_realtime
_require_test_program "punch-alternating"
-rm -f $seqres.full
-
# Format filesystem to get the block size
_scratch_mkfs > $seqres.full
_scratch_mount >> $seqres.full
# This is a regression test for fe341eb151ec ("xfs: ensure that fpunch,
# fcollapse, and finsert operations are aligned to rt extent size")
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw realtime collapse insert unshare zero prealloc
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_xfs_io_command "fzero"
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
# Format filesystem with a 256k realtime extent size
_scratch_mkfs -r extsize=256k > $seqres.full
_scratch_mount >> $seqres.full
# See if we catch corrupt directory names or attr names with nulls or slashes
# in them.
-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
+. ./common/preamble
+_begin_fstest auto quick fuzzers
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -r -f $imgfile $mntpt $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
_require_xfs_mkfs_crc
_disable_dmesg_check
-rm -f $seqres.full
-
imgfile=$TEST_DIR/img-$seq
mntpt=$TEST_DIR/mount-$seq
testdir=$mntpt/testdir
#
# Based on xfs/289
#
-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
+. ./common/preamble
+_begin_fstest auto quick growfs
loopfile=$TEST_DIR/fsfile
mntdir=$TEST_DIR/mntdir
loop_symlink=$TEST_DIR/loop_symlink.$$
+# Override the default cleanup function.
_cleanup()
{
$UMOUNT_PROG $mntdir
rm -f $loopfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# This means that it can navigate to random inodes, fails on paths that don't
# resolve.
#
-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/preamble
+_begin_fstest auto quick db
+
+# Import common functions.
. ./common/filter
# real QA test starts here
# This means that we can list the current directory, list an arbitrary path,
# and we can't list things that aren't directories.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick db
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# Use of "sync" mount option here is an attempt to get deterministic
# allocator behaviour.
#
-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
+. ./common/preamble
+_begin_fstest auto quick quota idmapped
wipe_mounts()
{
_scratch_unmount >/dev/null 2>&1
}
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
_require_idmapped_mounts
# Exercises basic XFS quota functionality
# uquota, gquota, uqnoenforce, gqnoenforce
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota idmapped
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs xfs
# repair activity in a later phase. Use a debug knob in xfs_repair to abort
# the repair immediately after forcing the flag on.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick repair
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_xfs_crc # needsrepair only exists for v5
_require_libxfs_debug_flag LIBXFS_DEBUG_WRITE_CRASH
-rm -f $seqres.full
-
# Set up a real filesystem for our actual test
_scratch_mkfs >> $seqres.full
# Repeat with the trip point set to successively higher numbers of writes until
# we hit ~200 writes or repair manages to run to completion without tripping.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto repair
-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
+# Import common functions.
. ./common/populate
. ./common/filter
_require_populate_commands
_require_libxfs_debug_flag LIBXFS_DEBUG_WRITE_CRASH
-rm -f $seqres.full
-
# Populate the filesystem
_scratch_populate_cached nofill >> $seqres.full 2>&1
# test the options that apply only to V4 filesystems because that disk format
# is deprecated.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick admin
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
_require_command "$XFS_ADMIN_PROG" "xfs_admin"
-rm -f $seqres.full
-
note() {
echo "$@" | tee -a $seqres.full
}
# correctly", insofar as the issue fixed by that patch was discovered with an
# earlier revision of this test.
-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
+. ./common/preamble
+_begin_fstest auto quick admin
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $fake_logfile $fake_rtfile $fake_datafile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch_nocheck
_require_command "$XFS_ADMIN_PROG" "xfs_admin"
-rm -f $seqres.full
-
# Create some fake sparse files for testing external devices and whatnot
fake_datafile=$TEST_DIR/$seq.scratch.data
rm -f $fake_datafile
# Check that we can upgrade a filesystem to support inobtcount and that
# everything works properly after the upgrade.
-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/preamble
+_begin_fstest auto quick inobtcount
+
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_command "$XFS_ADMIN_PROG" "xfs_admin"
_require_xfs_repair_upgrade inobtcount
-rm -f $seqres.full
-
# Make sure we can't format a filesystem with inobtcount and not finobt.
_scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \
echo "Should not be able to format with inobtcount but not finobt."
# This in combination with an xfs_ondisk.h build time check in the kernel
# ensures that the kernel agrees with userspace.
-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
+. ./common/preamble
+_begin_fstest auto quick bigtime
+# Override the default cleanup function.
_cleanup()
{
cd /
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs xfs
_require_scratch
_require_xfs_db_command timelimit
-rm -f $seqres.full
-
# Format filesystem without bigtime support and populate it
_scratch_mkfs > $seqres.full
echo classic xfs timelimits
# Check that we can upgrade a filesystem to support bigtime and that inode
# timestamps work properly after the upgrade.
-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/preamble
+_begin_fstest auto quick bigtime
+
+# Import common functions.
. ./common/filter
# real QA test starts here
date --date='Jan 1 00:00:00 UTC 2040' > /dev/null 2>&1 || \
_notrun "Userspace does not support dates past 2038."
-rm -f $seqres.full
-
# Make sure we can't upgrade a V4 filesystem
_scratch_mkfs -m crc=0 >> $seqres.full
_scratch_xfs_admin -O bigtime=1 2>> $seqres.full
# timers work properly after the upgrade. You need a quota-tools containing
# commit 16b60cb9e315ed for this test to run properly; v4.06 should do.
-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/preamble
+_begin_fstest auto quick bigtime quota
+
+# Import common functions.
. ./common/filter
. ./common/quota
date --date='Jan 1 00:00:00 UTC 2040' > /dev/null 2>&1 || \
_notrun "Userspace does not support dates past 2038."
-rm -f $seqres.full
-
# Format V5 filesystem without bigtime support and populate it
_scratch_mkfs -m crc=1,bigtime=0 >> $seqres.full
_qmount_option "usrquota"
# Make sure that attrs are handled properly when repair has to reset the root
# directory.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick attr repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
_require_populate_commands
_require_xfs_db_command "fuzz"
-rm -f $seqres.full
-
echo "Format and populate btree attr root dir"
_scratch_mkfs > "$seqres.full" 2>&1
_scratch_mount
# This test attempts to shrink with a small size (512K), half AG size and
# an out-of-bound size (agsize + 1) to observe if it works as expected.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick growfs shrinkfs
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
test_shrink()
_supported_fs xfs
_require_scratch_xfs_shrink
-rm -f $seqres.full
echo "Format and mount"
# agcount = 1 is forbidden on purpose, and need to ensure shrinking to
# * eof on an unwritten extent
# * eof on a sector boundary and not on a sector boundary
#
-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.*
-}
+. ./common/preamble
+_begin_fstest rw pattern auto prealloc quick
_filter_io()
{
{print $1, $2}' >> $seqres.full
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_xfs_io_command "falloc"
testfile=$TEST_DIR/file.$seq
-rm -f $seqres.full
_test_eof_hole()
{
# pv#962014 - DMF 3.7 reading incorrect data
# Doesn't actually reproduce the problem but it tried to :-)
#
-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.*
-}
+. ./common/preamble
+_begin_fstest rw pattern auto prealloc quick
_filter_io()
{
{print $1, $2}' >> $seqres.full
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# io tests
testfile=$TEST_DIR/file.$seq
rm -f $testfile
-rm -f $seqres.full
len=4
end=`expr 10 \* $len`
#
# ->page-mkwrite test - unwritten extents and mmap
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw metadata auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "exit \$status" 0 1 2 3 15
-rm -f $seqres.full
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# assumes 1st, 3rd and 5th blocks are single written blocks,
#
# unwritten extent conversion test
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-rm -f $seqres.full
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest rw metadata auto stress
+# Override the default cleanup function.
_cleanup()
{
$KILLALL_PROG -r -q -TERM fsstress 2> /dev/null
sleep 2
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# background fsstress workload. It will decrease the shrink size if
# larger size fails. And totally repeat 2 * TIME_FACTOR times.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto growfs shrinkfs ioctl prealloc stress
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
create_scratch()
_require_scratch_xfs_shrink
_require_xfs_io_command "falloc"
-rm -f $seqres.full
_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null
. $tmp.mkfs # extract blocksize and data size for scratch device
# of a multi-level refcount btree. Delete and recreate a few times to
# exercise the refcount btree grow/shrink functions.
#
-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
+. ./common/preamble
+_begin_fstest auto clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_supported_fs xfs
_require_scratch_reflink
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
# Check the filestreams allocator is doing its job.
# Multi-file data streams should always write into seperate AGs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw filestreams auto quick
-here=`pwd`
-tmp=/tmp/$$
-rm -f $seqres.full
-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
+# Import common functions.
. ./common/filter
. ./common/filestreams
# Check the filestreams allocator is doing its job.
# Multi-file data streams should always write into seperate AGs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-rm -f $seqres.full
-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/preamble
+_begin_fstest rw filestreams
+
+# Import common functions.
. ./common/filter
. ./common/filestreams
# Check the filestreams allocator is doing its job.
# Multi-file data streams should always write into seperate AGs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-rm -f $seqres.full
-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/preamble
+_begin_fstest rw filestreams
+
+# Import common functions.
. ./common/filter
. ./common/filestreams
# Check the filestreams allocator is doing its job.
# Multi-file data streams should always write into seperate AGs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-rm -f $seqres.full
-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/preamble
+_begin_fstest rw filestreams
+
+# Import common functions.
. ./common/filter
. ./common/filestreams
# Check the filestreams allocator is doing its job.
# Multi-file data streams should always write into seperate AGs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-rm -f $seqres.full
-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/preamble
+_begin_fstest rw filestreams auto
+
+# Import common functions.
. ./common/filter
. ./common/filestreams
# Reproduce PV#:967665
# Test if mkfs.xfs wipes old AG headers when using -f option
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest mkfs other auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
# dd the 1st sector then repair
_dd_repair_check()
{
fi
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/repair
#
# See how well reflink handles overflowing reflink counts.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
_require_cp_reflink
_require_test_program "punch-alternating"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs -d agcount=1 > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - Rewrite the whole file to use up reservations.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# will here) also call xfs_inactive_attrs.
# We want to test out this xfs_inactive_attrs code being called in recovery.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown log auto quick
+# Override the default cleanup function.
_cleanup()
{
rm -f $tmp.*
}
pid=""
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/log
# real QA test starts here
_supported_fs xfs
-rm -f $seqres.full
rm -f $tmp.log
_require_scratch
# - Rewrite the whole file to use up reservations.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Test to check bulkstat returns unlinked-but-referenced inodes
# (PVs: 972128, 972004)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw other auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# - falloc the whole file to unshare blocks.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# and then turn on attr1 and add one more EA which
# will write over the shortform dirents.
#
-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.*
-}
+. ./common/preamble
+_begin_fstest attr auto quick
_create_dirents()
{
_scratch_xfs_db -x -c "version attr1" | _filter_version
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
_require_attrs
_require_attr_v1
-rm -f $seqres.full
-
_scratch_mkfs -i attr=2,size=512 -l lazy-count=1 | _filter_mkfs \
>>$seqres.full 2>$tmp.mkfs
# import crc status and attr version
# Test the case where there are no more features2 bits on and
# so the morebitsbit should be off.
#
-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.*
-}
+. ./common/preamble
+_begin_fstest attr auto quick
_filter_version()
{
tee -a $seqres.full | tr ',' '\n' | egrep 'ATTR|MORE|LAZY'
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
_require_attr_v1
_require_projid16bit
-rm -f $seqres.full
-
# Reset the options so that we can control what is going on here
export MKFS_OPTIONS=""
export MOUNT_OPTIONS=""
# value in XFS stressing leaf block traversal in
# node form directories as well.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest ci dir auto
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $SCRATCH_MNT/$seq
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs xfs
_require_scratch
_require_xfs_mkfs_ciname
-rm -f $seqres.full
_scratch_mkfs -n version=ci >/dev/null 2>&1
_scratch_mount
-status=1 # default failure
sourcefile=$tmp.ci_nametest
seed=1
# <---- Normal programming is resumed ---->
#
#
-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
-tag="added by qa $seq"
+. ./common/preamble
+_begin_fstest mount auto quick
-rm -f $seqres.full
+tag="added by qa $seq"
+# Override the default cleanup function.
_cleanup()
{
cd /
$SED_PROG -i "/# $tag/d" /etc/fstab
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
# PV 985792
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest rw auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-rm -f $seqres.full
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# mkfs.xfs input validation test. Designed to break mkfs.xfs if it doesn't
# filter garbage input or invalid option combinations correctly.
#
-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
+. ./common/preamble
+_begin_fstest auto quick mkfs realtime
+# Override the default cleanup function.
_cleanup()
{
cd /
[ -n "$loopdev" ] && _destroy_loop_device $loopdev
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_loop
_require_xfs_mkfs_validation
-rm -f $seqres.full
echo silence is golden
# clear out any options to mkfs first. We want to test realtime and external log
do_mkfs_fail -l version=1 -m crc=1 $SCRATCH_DEV
do_mkfs_fail -l version=0 $SCRATCH_DEV
-
-
# naming section, should pass
do_mkfs_pass -n size=65536 $SCRATCH_DEV
do_mkfs_pass -n version=2 $SCRATCH_DEV
do_mkfs_pass -r extsize=1G $SCRATCH_DEV
do_mkfs_pass -r noalign $SCRATCH_DEV
-
# realtime section, should fail
do_mkfs_fail -r rtdev=$SCRATCH_DEV
do_mkfs_fail -r extsize=256 $SCRATCH_DEV
do_mkfs_fail -r extsize=2G $SCRATCH_DEV
do_mkfs_fail -r size=65536 $SCRATCH_DEV
-
# inode section, should pass
do_mkfs_pass -i size=256 -m crc=0 $SCRATCH_DEV
do_mkfs_pass -i size=512 $SCRATCH_DEV
do_mkfs_pass -i sparse=0 $SCRATCH_DEV
do_mkfs_pass -i sparse -m crc $SCRATCH_DEV
-
# inode section, should fail
do_mkfs_fail -i size=256 -m crc $SCRATCH_DEV
do_mkfs_fail -i size=128 $SCRATCH_DEV
# - falloc the whole file to unshare blocks.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "funshare"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - Buffered write to random offsets to scatter CoW reservations.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Test mapping around/over holes for sub-page blocks
#
-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
+. ./common/preamble
+_begin_fstest rw auto
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# only xfs supported due to use of xfs_bmap
_supported_fs xfs
# real QA test starts here
-rm -f $seqres.full
_require_scratch
_scratch_mkfs_xfs >/dev/null 2>&1
test "$(_get_block_size $SCRATCH_MNT)" = $blksize || \
_notrun "Could not get $blksize-byte blocks"
-
# 512b block / 4k page example:
#
#1) Write 1k of data (buffered):
#
# http://oss.sgi.com/bugzilla/show_bug.cgi?id=340
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest ioctl dump auto quick
+# Override the default cleanup function.
_cleanup()
{
rm -rf $TEST_DIR/d
rm -f $TEST_DIR/dumpfile
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
#
# Perform a level 0 dump that respects the chattr dump exclude flag,
| sed -e 's/.*xfsdump: pruned ino [0-9]*, owner 0, estimated size 0: skip flag set/xfsdump: pruned ino NNN, owner 0, estimated size 0: skip flag set/'
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# success, all done
echo "*** done"
-rm -f $seqres.full
status=0
# without any indirect block reservation whatsoever. This leads to assert
# failures and possibly other problems in XFS.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rw
-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
+# Import common functions.
. ./common/punch
. ./common/inject
# real QA test starts here
-rm -f $seqres.full
# Modify as appropriate.
_supported_fs generic
#
# http://oss.sgi.com/bugzilla/show_bug.cgi?id=808
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest dir auto quick
+# Override the default cleanup function.
_cleanup()
{
rm -rf $TEST_DIR/ttt
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# success, all done
echo "*** done"
-rm -f $seqres.full
status=0
# - Directio write to random offsets to scatter CoW reservations.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# filesystem is first mounted read-only and then later remounted read-write,
# which is the usual case for the root filesystem.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest mount auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount >/dev/null 2>&1
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# success, all done
echo "*** done"
-rm -f $seqres.full
status=0
# - falloc the whole fle to see if the extsz hints still apply.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Only happens on 32-bit kernels without CONFIG_LBD, but it should be harmless
# to run this everywhere.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest metadata auto quick
+# Override the default cleanup function.
_cleanup()
{
_scratch_unmount
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# success, all done
echo "*** done"
-rm -f $seqres.full
status=0
#
# Test out the xfs_repair -o force_geometry option on single-AG filesystems.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest repair auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/repair
# success, all done
echo "*** done"
-rm -f $seqres.full
status=0
# Test out reallocation of the extent array in xfs_io.
# Based on a testcase from Tomasz Majkowski <moosh009@gmail.com>.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest ioctl auto
_write_holes()
{
{print $1, $2; next}'
}
+# Override the default cleanup function.
_cleanup()
{
rm -f $SCRATCH_MNT/r??
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-rm -f $seqres.full
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# - falloc the whole fle to see if the extsz hints still apply.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "funshare"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Test out ENOSPC flushing on small filesystems.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest metadata rw auto
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# single AG will cause xfs_repair to fail checks.
_require_scratch_nocheck
-rm -f $seqres.full
-
# Disable the scratch rt device to avoid test failures relating to the rt
# bitmap consuming all the free space in our small data device.
unset SCRATCH_RTDEV
# Patch and testcase at
# http://article.gmane.org/gmane.comp.file-systems.xfs.general/29193
#
-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
+. ./common/preamble
+_begin_fstest growfs auto quick
+# Override the default cleanup function.
_cleanup()
{
umount $tmpdir
rm -f $tmpfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_notrun "This test is only valid on 64 bit machines"
fi
-rm -f $seqres.full
-
tmpfile=$TEST_DIR/fsfile.$$
tmpdir=$TEST_DIR/tmpdir.$$
# - Ensure that we can set only cowextsz on a many-byte file.
# - Ensure that whatever we set we get back later.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
grep -q "\[.*${flg}.*\]" && echo "$flg flag set" || echo "$flg flag unset"
}
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - Check the number of extents.
# - Repeat, but with extsz = 1MB and cowextsz = $blocksize.
#
-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 -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick clone
+
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Make sure setting cowextsz on a directory propagates it to subfiles.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# destination does not already have a cowextsz setting. It should not do so
# otherwise.
#
-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 -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick clone
+
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - Rewrite the whole file to use up reservations.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest clone_stress
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - Dirty one byte on the second file and fsync.
# - Crash the FS to test recovery.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest shutdown auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_xfs_io_command "fiemap"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# charged for buffered copy on write. Same test as g/305, but we get to
# play with cowextsz.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/quota
_require_xfs_io_command "cowextsize"
_require_user
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
# charged for directio copy on write. Same as g/326, but we get to play
# with cowextsz.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/quota
_require_odirect
_require_user
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
export MOUNT_OPTIONS="-o usrquota,grpquota $MOUNT_OPTIONS"
# - directio CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# log size mkfs test - ensure the log size scaling works for small filesystems
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest log metadata auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# large log size mkfs test - ensure the log size scaling works
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest log metadata auto
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# - CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - directio CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Based on bug reports from Utako Kusaka <u-kusaka@wm.jp.nec.com> and
# Ryota Yamauchi <r-yamauchi@vf.jp.nec.com>.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quota quick
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount >/dev/null 2>&1
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
# - CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# inodes to try to defragment. This is effectively a crash/assert failure
# test looking for corruption induced by xfs_fsr runs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto fsr ioctl quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# - directio CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - directio CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# the indoes to be swapped. It also is good for validating fsr's attribute fork
# generation code.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto fsr
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs xfs
_require_scratch
-rm -f $seqres.full
-
[ "$XFS_FSR_PROG" = "" ] && _notrun "xfs_fsr not found"
# create freespace holes of 1-3 blocks in length
# - directio CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone punch
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Based on a bug report and testcase from Geoffrey Wehrman <gwehrman@sgi.com>.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto rw
+# Override the default cleanup function.
_cleanup()
{
rm -rf ${TDIR}
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs xfs
# - CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone punch
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - Wait for the reclaim to run.
# - Write more and see how bad fragmentation is.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
old_cowgc_interval=$(_xfs_get_cowgc_interval)
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - Wait for the reclaim to run.
# - Write more and see how bad fragmentation is.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
old_cowgc_interval=$(_xfs_get_cowgc_interval)
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Tests xfs_growfs on a rmapbt filesystem
#
-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/preamble
+_begin_fstest auto quick rmap
+
+# Import common functions.
. ./common/filter
# real QA test starts here
# of a multi-level rmap btree, and that metadump will successfully copy
# said block.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rmap punch
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $metadump_file $TEST_DIR/image
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_xfs_scratch_rmapbt
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
# Create and populate an XFS filesystem, corrupt the rmap btree,
# then see how the kernel and xfs_repair deal with it.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest fuzzers rmap
-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
+# Import common functions.
. ./common/filter
. ./common/attr
_require_xfs_scratch_rmapbt
test -n ${FORCE_FUZZ} || _require_scratch_xfs_crc
-rm -f $seqres.full
-
echo "+ create scratch fs"
_scratch_mkfs_xfs > /dev/null
# of a multi-level rmap btree. Delete and recreate a few times to
# exercise the rmap btree grow/shrink functions.
#
-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
+. ./common/preamble
+_begin_fstest auto rmap punch
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_xfs_scratch_rmapbt
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
#
# Test AIO DIO CoW behavior when the write temporarily fails.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_xfs_io_command "cowextsize"
_require_aiodio "aiocp"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
#
# Check stale handles pointing to unlinked files are detected correctly
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick metadata ioctl
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Test AIO DIO CoW behavior.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $TEST_DIR/moo
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_aiodio "aiocp"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Test AIO CoW behavior when the write temporarily fails.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/dmerror
_require_aiodio "aiocp"
AIO_TEST="$here/src/aio-dio-regress/aiocp"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_dmerror_init
#
# Test AIO CoW behavior.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $TEST_DIR/moo
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_aiodio "aiocp"
AIO_TEST="$here/src/aio-dio-regress/aiocp"
-rm -f $seqres.full
-
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Test XFS_IOC_ZERO_RANGE
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc zero
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/punch
# - CoW across the halfway mark, starting with the unwritten extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone punch
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "bmap" "-c"
_require_cp_reflink
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# test to verify that proper project quota id is correctly set
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
+# Override the default cleanup function.
_cleanup()
{
cd /
export MOUNT_OPTIONS="-opquota"
-rm -f $seqres.full
# make fs with no projid32bit
_scratch_mkfs_xfs -i projid32bit=0 >> $seqres.full || _fail "mkfs failed"
_qmount
# - reflink file1 to file2
# - compare file[12]
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "bmap" "-c"
_require_cp_reflink
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Create an empty file and try to query the (nonexistant) CoW fork.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_xfs_io_command "bmap" "-c"
_require_scratch
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Mount a reflink/rmap filesystem ro (so the per-AG reservation isn't
# created) and unmount, to ensure that we free correctly.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_supported_fs xfs
_require_scratch_reflink
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount -o ro >> $seqres.full 2>&1
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Bmap btree corruption regression test
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw prealloc metadata
+# Override the default cleanup function.
_cleanup()
{
cd /
rmdir $LOOP_MNT
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Test fallocate hole punching
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick prealloc punch
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/punch
# instances where the obfuscation process has produced a filename
# that is already in use (and no other name is available to use).
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f "${METADUMP_FILE}"
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_require_test
echo "Disciplyne of silence is goed."
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "falloc"
_require_xfs_io_command "cowextsize"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# regular extent.
# - Check that the files are now different where we say they're different.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
#
# Test fs creation on 4 TB minus few bytes partition
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
rm -f "$testfile"
}
-trap "_cleanup ; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# (mkfs.xfs: fix ASSERT on too-small device with stripe geometry)
#
-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
+. ./common/preamble
+_begin_fstest auto quick mkfs
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $localfile
}
-# get standard environment, filters and checks
-. ./common/rc
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
echo 'Silence is golden'
# directory, even if the problem directory is completely unrelated
# to the directory one wants to operate on.
#
-seq=$(basename $0)
-seqres=$RESULT_DIR/$seq
-echo "QA output created by ${seq}"
+. ./common/preamble
+_begin_fstest auto quick quota
-here=$(pwd)
-
-tmp=/tmp/$$
my_mtab=${tmp}.mtab
mtab=/proc/self/mounts
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f ${tmp}.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
echo "Silence is golden."
-rm -f $seqres.full
# real QA test starts here
# repair mode (which will rebuild the data forks of the running scrub
# executable and libraries!) to see what happens.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/fuzzy
. ./common/inject
#
# test xfs_quota state command
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
_require_xfs_mkfs_crc
_require_xfs_crc
-rm -f $seqres.full
-
function option_string()
{
VAL=$1
# Test XFS EIO error handling configuration. Stop XFS from retrying
# to writeback forever when hit EIO.
#
-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
+. ./common/preamble
+_begin_fstest auto quick mount eio
+# Override the default cleanup function.
_cleanup()
{
cd /
_dmerror_cleanup
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmerror
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
_require_scratch
# truncating the copies at successively lower sizes. Delete and recreate a few
# times to exercise the refcount btree grow/shrink functions.
#
-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
+. ./common/preamble
+_begin_fstest auto clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
#
# Test incremental dumps with -D (skip unchanged dirs)
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
{print}'
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
#
# Test xfsdump with a file spanning multiple media files.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl tape
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
_stable_fs
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
. ./common/attr
# at the end of the first media file (i.e., no file is split
# across media files).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dump ioctl tape
-here=`pwd`
-tmp=/tmp/$$
status=0 # success is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
_stable_fs
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
. ./common/attr
#
# Check that attr_list_by_handle copies the cursor back to userspace.
#
-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
+. ./common/preamble
+_begin_fstest auto quick ioctl
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf "$tmp".* $TEST_DIR/fsmap $TEST_DIR/testout
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/populate
# kernel (d0a58e8 xfs: disallow rw remount on fs with unknown
# ro-compat features), and this case is the regression testcase.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick mount
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
# skip fs check because superblock contains unknown ro-compat features
#
# Check that getfsmap reports the AG metadata we're expecting.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rmap fsmap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf "$tmp".* $TEST_DIR/fsmap $TEST_DIR/testout
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Check that getfsmap agrees with getbmap.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rmap fsmap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf "$tmp".* $TEST_DIR/fsmap $TEST_DIR/bmap
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Populate filesystem, check that fsmap -n10000 matches fsmap -n1.
#
-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
+. ./common/preamble
+_begin_fstest auto rmap fsmap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf "$tmp".* $TEST_DIR/a $TEST_DIR/b
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
#
# Check that getfsmap agrees with getbmap for reflinked files.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rmap fsmap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf "$tmp".* $TEST_DIR/fsmap $TEST_DIR/bmap
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
#
# Check that getfsmap reports external log devices
#
-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
+. ./common/preamble
+_begin_fstest auto quick rmap fsmap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf "$tmp".* $TEST_DIR/fsmap $TEST_DIR/testout
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Check that getfsmap agrees with getbmap when realtime files are present.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rmap fsmap realtime
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf "$tmp".* $TEST_DIR/fsmap $TEST_DIR/bmap
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Check that getfsmap reports internal log devices
#
-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
+. ./common/preamble
+_begin_fstest auto quick rmap fsmap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf "$tmp".* $TEST_DIR/fsmap $TEST_DIR/testout
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# at the first run. See also commit 198b747f255346bca64408875763b6ca0ed3d57d
# from xfsprogs tree.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest repair auto
-here=`pwd`
-tmp=/tmp/$$
status=0 # 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
+# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs xfs
_require_scratch
-rm -f $seqres.full
_scratch_mkfs >$seqres.full 2>&1
_scratch_mount
# Test mkfs.xfs against various types of devices with varying
# logical & physical sector sizes and offsets.
#
-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
+. ./common/preamble
+_begin_fstest auto mkfs
+# Override the default cleanup function.
_cleanup()
{
cd /
_put_scsi_debug_dev
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/scsi_debug
_require_scsi_debug
-rm -f $seqres.full
-
# Remove xfs signature so -f isn't needed to re-mkfs
_wipe_device()
{
#
# Check that GETBMAPX accurately report shared extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
#
# Test that xfsdump can generate a format 2 dump.
#
-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
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
# level 0 - format 2
# level 1 - current format
#
-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
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
# level 0 - current format
# level 1 - format 2
#
-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
+. ./common/preamble
+_begin_fstest dump ioctl auto quick
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dump
# real QA test starts here
# Do xfs_metadump, xfs_mdrestore, xfs_copy, xfs_db, xfs_repair and mkfs.xfs
# on mounted XFS to make sure they refuse to proceed.
#
-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
+. ./common/preamble
+_begin_fstest auto quick dump copy db mkfs repair
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $COPY_FILE 2>/dev/null
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
_require_xfs_copy
#
# Race fio and xfs_scrub for a while to see if we crash or livelock.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/fuzzy
. ./common/inject
#
# Race fio and xfs_scrub for a while to see if we crash or livelock.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/fuzzy
. ./common/inject
# Test to verify project quota xfs_admin, xfsdump/xfsrestore and
# xfs_db functionality
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-here=`pwd`
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-rm -f $seqres.full
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto dump quota quick
+
+# Import common functions.
. ./common/quota
. ./common/dump
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
# When an attribute leaf block count is 0, xfs_repair should junk
# that leaf directly (as xfsprogs commit f714016).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick repair fuzzers
-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
+# Import common functions.
. ./common/filter
. ./common/attr
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs xfs
_require_scratch
# Test to ensure xfs_growfs command rejects non-existent mount points
# and accepts mounted targets.
#
-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
+. ./common/preamble
+_begin_fstest growfs auto quick
+# Override the default cleanup function.
_cleanup()
{
$UMOUNT_PROG $tmpdir
rm -f $tmpfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Primarily tests page boundries and boundries that are
# off-by-one to ensure we're only tossing what's expected
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rw prealloc quick ioctl zero
-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
+# Import common functions.
. ./common/filter
. ./common/punch
#
# Test xfs_repair on fragmented multi-block dir2 fs
#
-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/preamble
+_begin_fstest auto repair
+
+# Import common functions.
. ./common/filter
_supported_fs xfs
# real QA test starts here
-rm -f $seqres.full
_require_scratch
logblks=$(_scratch_find_xfs_min_logblocks -n size=16k -d size=133m)
_scratch_mkfs_xfs -n size=16k -l size=${logblks}b -d size=133m >> $seqres.full 2>&1
# Ensure mkfs with stripe geometry goes into multidisk mode
# which results in more AGs
#
-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/preamble
+_begin_fstest auto mkfs quick
+
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Ensure all xfs_io commands are documented
#
-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/preamble
+_begin_fstest auto quick
+
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Failure is a hang; KASAN should also catch this.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto dir metadata
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test xfs_logprint w/ multiply-logged inodes & continued transactions
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto logprint quick
-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
+# Import common functions.
. ./common/filter
. ./common/attr
_require_scratch
_require_attrs
-rm -f $seqres.full
-
logblks=$(_scratch_find_xfs_min_logblocks)
_scratch_mkfs -l size=${logblks}b >/dev/null 2>&1
#
# Test that xfsdump/restore preserves file capabilities
#
-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
+. ./common/preamble
+_begin_fstest dump auto quick
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dump
_require_command "$SETCAP_PROG" setcap
_require_command "$GETCAP_PROG" getcap
-rm -f $seqres.full
-
_wipe_fs
mkdir -p $dump_dir
# Regression test for commit:
# 437a255 xfs: fix direct IO nested transaction deadlock.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto freeze
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_freeze
_require_command "$KILLALL_PROG" killall
-rm -f $seqres.full
logblks=$(_scratch_find_xfs_min_logblocks -d agcount=16,su=256k,sw=12 -l su=256k)
_scratch_mkfs_xfs -d agcount=16,su=256k,sw=12 -l su=256k,size=${logblks}b >/dev/null 2>&1
_scratch_mount
# attributes forces it into being remote symlink.
# Warning: this test will ASSERT on unpatched DEBUG XFS.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto attr symlink quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
_require_scratch
-rm -f $seqres.full
_scratch_mkfs_xfs >/dev/null 2>&1
SYMLINK_FILE="$SCRATCH_MNT/symlink"
# uquota, gquota, pquota
# uqnoenforce, gqnoenforce, pqnoenforce
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
-trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_supported_fs xfs
echo "*** unmount"
_scratch_unmount
-
_scratch_mkfs_xfs -m crc=1 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
cat $tmp.mkfs >>$seqres.full
# keep the blocksize and data size for dd later
#
# Test xfs_fsr / swapext management of di_forkoff w/ selinux
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto fsr
-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
+# Import common functions.
. ./common/filter
_require_scratch
getenforce | grep -q "Enforcing\|Permissive" || _notrun "SELinux not enabled"
[ "$XFS_FSR_PROG" = "" ] && _notrun "xfs_fsr not found"
-rm -f $seqres.full
-
_scratch_mkfs_xfs -m crc=0 -i size=256 >> $seqres.full 2>&1 \
|| _fail "mkfs failed"
#
# Verify multi-stream xfsdump/restore preserves extended attributes
#
-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
+. ./common/preamble
+_begin_fstest auto dump
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dump
. ./common/attr
attr_name=attrname
attr_value=1234
-rm -f $seqres.full
-
_create_dumpdir_fill_ea
# Create and add wholly-sparse file to the dump directory
#
# Dump and restore partialmax + 1 wholly-sparse files
#
-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
+. ./common/preamble
+_begin_fstest auto dump
+# Override the default cleanup function.
_cleanup()
{
_cleanup_dump
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dump
_supported_fs xfs
_require_scratch
-rm -f $seqres.full
-
echo "Silence is golden."
_wipe_fs
mkdir $dump_dir >> $seqres.full 2>&1 || _fail "mkdir \"$dump_dir\" failed"
# Test to verify xfs_quota(8) administrator commands can deal with invalid
# storage mount point without NULL pointer dereference problem.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# Test to verify that turn group/project quotas off while user quotas
# are left on.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
_require_xfs_mkfs_crc
_require_xfs_crc
-rm -f $seqres.full
_scratch_mkfs_xfs -m crc=1 >/dev/null 2>&1
_qmount_option "uquota,gquota,pquota"
# Test to verify that turn group/project quotas off while fstress and
# user quotas are left on.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
_require_xfs_crc
_require_command "$KILLALL_PROG" killall
-rm -f $seqres.full
_scratch_mkfs_xfs -m crc=1 >/dev/null 2>&1
_qmount_option "uquota,gquota,pquota"
# transaction submission, when the associated buffer log item is pushed from the
# CIL (i.e., when the log is subsequently flushed).
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick punch
-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
+# Import common functions.
# Modify as appropriate.
_supported_fs xfs
_require_xfs_io_command "fpunch"
_require_command $UUIDGEN_PROG uuidgen
-rm -f $seqres.full
-
# Disable the scratch rt device to avoid test failures relating to the rt
# bitmap consuming all the free space in our small data device.
unset SCRATCH_RTDEV
# - Use the debugger to fake a leftover CoW extent
# - See if xfs_repair fixes it
#
-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 -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick clone
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_supported_fs xfs
_require_scratch_reflink
-rm -f $seqres.full
-
echo "Format"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full
# - Use the debugger to fake a leftover CoW extent
# - See if mount/umount fixes it
#
-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 -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick clone
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_supported_fs xfs
_require_scratch_reflink
-rm -f $seqres.full
-
echo "Format"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full
# truncating the copies at successively lower sizes. Delete and recreate a few
# times to exercise the refcount btree grow/shrink functions.
#
-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
+. ./common/preamble
+_begin_fstest auto clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
_scratch_mkfs >/dev/null 2>&1
_scratch_mount
#
# Create a file with more than 2^21 blocks (the max length of a bmbt record).
#
-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
+. ./common/preamble
+_begin_fstest auto clone rmap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/dmhugedisk
_require_scratch_nocheck
_require_xfs_io_command "falloc"
-rm -f $seqres.full
-
# Figure out block size
echo "Figure out block size"
_scratch_mkfs >/dev/null 2>&1
# certain metadata read verifier checks could access invalid memory and cause a
# panic.
#
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
cd /
_cleanup_delay > /dev/null 2>&1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dmdelay
# Modify as appropriate.
_require_scratch
_require_dm_target delay
-rm -f $seqres.full
-
echo "Silence is golden."
_scratch_mkfs_xfs >> $seqres.full 2>&1
# Reflink a file with a few dozen extents, CoW a few blocks, and rm.
# Inject an error during block remap to test log recovery.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_xfs_io_command "fpunch"
_require_xfs_io_error_injection "bmap_finish_one"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks))
# Reflink a file with a few dozen extents, CoW a few blocks, and rm.
# Inject an error during refcount updates to test log recovery.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_xfs_io_command "fpunch"
_require_xfs_io_error_injection "refcount_finish_one"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks))
# Reflink a file with a few dozen extents, CoW a few blocks, and rm.
# Inject an error during rmap updates to test log recovery.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_error_injection
_require_xfs_io_error_injection "rmap_finish_one"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks))
# Reflink a file with a few dozen extents and CoW a few blocks.
# Inject an error during extent freeing to test log recovery.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_xfs_io_command "cowextsize"
_require_xfs_io_error_injection "free_extent"
-rm -f $seqres.full
-
blksz=65536
blks=4
sz=$((blksz * blks))
# Reflink a file with a few dozen extents, CoW a few blocks, and rm.
# Force XFS into "two refcount updates per transaction" mode.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_xfs_io_command "fpunch"
_require_xfs_io_error_injection "refcount_continue_update"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks))
#
# Simulate rmap update errors with a file write and a file remove.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rmap
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/inject
_require_error_injection
_require_xfs_io_error_injection "rmap_finish_one"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks))
#
# Simulate free extent errors with a file write and a file remove.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/inject
_require_error_injection
_require_xfs_io_error_injection "rmap_finish_one"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks))
# Reflink a file.
# Inject an error during block remap to test log recovery.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_scratch_reflink
_require_xfs_io_error_injection "bmap_finish_one"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks))
# Reflink a file.
# Inject an error during block remap to test log recovery.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_scratch_reflink
_require_xfs_io_error_injection "bmap_finish_one"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks - 17))
# Reflink a file.
# Inject an error during refcount update to test log recovery.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_scratch_reflink
_require_xfs_io_error_injection "refcount_finish_one"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks))
# Reflink a file.
# Inject an error during rmap update to test log recovery.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_xfs_scratch_rmapbt
_require_xfs_io_error_injection "rmap_finish_one"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks))
# Reflink a file.
# Inject an error during extent free to test log recovery.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_scratch_reflink
_require_xfs_io_error_injection "free_extent"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks))
# Reflink a file with a few dozen extents.
# Force XFS into "two refcount updates per transaction" mode.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_xfs_io_command "fpunch"
_require_xfs_io_error_injection "refcount_continue_update"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks))
# Reflink a file with a few dozen extents, CoW a few blocks, and rm.
# Inject an error during extent freeing to test log recovery.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_error_injection
_require_xfs_io_error_injection "free_extent"
-rm -f $seqres.full
-
blksz=65536
blks=30
echo "Format filesystem"
# cowextsize so that the refcount failure is somewhere in the CoW remap
# instead of when we're stashing the CoW orphan record.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
_require_xfs_io_command "fpunch"
_require_xfs_io_error_injection "refcount_finish_one"
-rm -f $seqres.full
-
blksz=65536
blks=64
sz=$((blksz * blks))
# that (fortunately) triggered asserts in the rmap code when clearing
# the reflink flag.
#
-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
+. ./common/preamble
+_begin_fstest auto quick clone
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_cp_reflink
_require_scratch_reflink
-rm -f $seqres.full
-
nr=128 # spanning at least one inode chunk tickles a bug in xfs_repair
echo "Format filesystem"
_scratch_mkfs >/dev/null 2>&1
#
# See how well xfs_fsr handles "defragging" a file with a hojillion extents.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone fsr
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
#
# Ensure that xfs_fsr handles errors correctly while defragging files.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone fsr
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
#
# Ensure that xfs_fsr handles quota correctly while defragging files.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone fsr quota
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
#
# Create a big enough rmapbt that we tickle a fdblocks accounting bug.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rmap clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
#
# Make sure query_range returns -EINVAL if lowkey > highkey.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rmap clone collapse punch insert zero
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
#
# Set rrmapino to another inode on an non-rt rmap fs and see if repair fixes it.
#
-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 -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick rmap realtime
+
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Ensure that we can create a few realtime files on a rmapbt filesystem.
#
-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 -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick rmap realtime
+
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Exercise expanding and shrinking the realtime rmap btree.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto rmap realtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Exercise metadump on realtime rmapbt preservation.
#
-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
+. ./common/preamble
+_begin_fstest auto rmap realtime
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf "$tmp".* $metadump_file
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Corrupt the realtime rmapbt and see how the kernel and xfs_repair deal.
#
-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 -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest fuzzers rmap realtime
+
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Set rrmapino to zero on an rtrmap fs and see if repair fixes it.
#
-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 -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick rmap realtime
+
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Link rrmapino into the rootdir on an rtrmap fs and see if repair fixes it.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rmap realtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Set rrmapino to another inode on an rtrmap fs and see if repair fixes it.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rmap realtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Cross-link file block into rtrmapbt and see if repair fixes it.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rmap realtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Cross-link rtrmapbt block into a file and see if repair fixes it.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rmap realtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
#
# Basic rmap manipulation tests for realtime files.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rmap collapse punch insert zero realtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# - falloc the whole file to unshare blocks.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "funshare"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - Buffered write to random offsets to scatter CoW reservations.
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - Unmount, remount, repeat (twice more).
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "funshare"
_require_odirect
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# - Unmount, remount, repeat (twice more).
# - Check the number of extents.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# Set all possible file type values for different types of files
# and verify that xfs_repair detects the correct errors.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick fuzzers repair
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/repair
# in dmesg as expected
_disable_dmesg_check
-rm -f $seqres.full
-
_scratch_mkfs >>$seqres.full 2>&1
_scratch_mount
# Populate a XFS filesystem and ensure that scrub and repair are happy.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers scrub
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every superblock field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every superblock field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every AGF field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every AGF field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every AGFL field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every AGFL field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every AGI field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every AGI field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every bnobt field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every bnobt field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every bnobt key/pointer.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every bnobt key/pointer.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every cntbt field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every cntbt field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every inobt field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every inobt field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every finobt field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every finobt field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every rmapbt field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every rmapbt field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Use xfs_repair to fix the corruption.
# Use xfs_repair to repair the problems.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Use xfs_scrub to fix the corruption.
# Use xfs_scrub to repair the problems.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every refcountbt field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every refcountbt field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every btree-format directory inode field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every btree-format directory inode field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every extents-format file inode field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every extents-format file inode field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every btree-format file inode field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every btree-format file inode field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every bmbt block field.
# Use xfs_repair to fix the corruption.
#
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every bmbt block field.
# Use xfs_scrub to fix the corruption.
#
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every symlink remote block field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every symlink remote block field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every inline directory inode field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every inline directory inode field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every block-format dir block field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every block-format dir block field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every data-format dir block field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every data-format dir block field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every leaf1-format dir block field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every leaf1-format dir block field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every leafn-format dir block field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every leafn-format dir block field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every node-format dir block field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every node-format dir block field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every freeindex-format dir block field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every freeindex-format dir block field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every inline attr inode field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every inline attr inode field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every leaf-format attr block field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every leaf-format attr block field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every node-format attr block field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every node-format attr block field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every external attr block field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every external attr block field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every rtrmapbt record field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair realtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every rtrmapbt record field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair realtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every rtrmapbt keyptr field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair realtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every rtrmapbt keyptr field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair realtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every refcountbt field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every refcountbt field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every btree-format attr inode field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every btree-format attr inode field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every blockdev inode field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every blockdev inode field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every local-format symlink inode field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every local-format symlink inode field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every AG1 superblock field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# second dirty block. We need the huge cowextsize so that the hole
# area receives preallocation in the CoW fork.
#
-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 -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick clone punch seek
+
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# second dirty block. We need the huge cowextsize so that the hole
# area receives preallocation in the CoW fork.
#
-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 -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest auto quick clone punch seek
+
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "fpunch"
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1
# rmapbt repair requires us to freeze the filesystem to stop all filesystem
# activity, so we can't have userspace wandering in and thawing it.
#
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
+. ./common/preamble
+_begin_fstest dangerous_scrub dangerous_online_repair
+
+_register_cleanup "_cleanup" BUS
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/fuzzy
. ./common/inject
# extents for di_nblocks if the fork is in extents format, but we don't
# count them if the fork is in btree format.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_scrub
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/fuzzy
. ./common/inject
# emit spurious verifier errors for all but the first.
# This issue has been fixed in xfsprogs-dev:
# '533d1d2 ("xfs_db: properly set inode type")'
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick db
filter_dbval()
{
awk '{ print $4 }'
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate
_supported_fs xfs
# Populate a XFS filesystem and fuzz every user dquot field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every user dquot field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every group dquot field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every group dquot field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every project dquot field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every project dquot field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
#
# See CVE-2017-14340 for more information.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Now that we've upped metadump's default too-long-extent discard
# threshold to 2^21 blocks, make sure we never do that again.
#
-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
+. ./common/preamble
+_begin_fstest auto quick dir metadata
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f "$tmp".* $metadump_file $metadump_img
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# Commit f35c5e10c6ed ("xfs: reinit btree pointer on attr tree inactivation
# walk") fixed the bug.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick attr
-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
+# Import common functions.
. ./common/attr
. ./common/inject
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# be able to release the quota inodes when we're aborting the mount. We
# also should not leak dquots.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone fsr
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
# On a subsequent mount attempt, we should be able to release the quota
# inodes when we're aborting the mount. We also should not leak dquots.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
# the unlinked inode and without leaking the linked inode, and we should
# be able to release all the inodes when we're aborting the mount.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone fsr
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/reflink
# libxfs_ symbols (in libxfs-api-defs.h) instead of raw xfs_ functions.
# This is for the maintainers; it's not a functionality test.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick other
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
[ -z "$WORKAREA" ] && \
#
# Fixed by upstream commit 373b058 ("xfs: Properly retry failed dquot
# items in case of error during buffer writeback")
-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
+. ./common/preamble
+_begin_fstest auto quick quota
+# Override the default cleanup function.
_cleanup()
{
[ -z "${interval}" ] || \
echo -e $table
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/dmflakey
. ./common/quota
_require_xfs_quota
_require_freeze
-rm -f $seqres.full
-
echo "Silence is golden"
_scratch_mkfs > $seqres.full 2>&1
# the invalid sb_logsunit leads to crash as soon as we try to write to
# the log.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick fuzzers log
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# a file that has CoW reservations and no dirty pages. The reservations
# should shift over to the new owner, but they do not.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone quota
-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
+# Import common functions.
. ./common/reflink
. ./common/quota
. ./common/filter
_require_cp_reflink
_require_user
-rm -f $seqres.full
-
echo "Format and mount"
_scratch_mkfs > "$seqres.full" 2>&1
_scratch_mount "-o usrquota,grpquota" >> "$seqres.full" 2>&1
# Regression test for a quota accounting bug when reflinking across EOF
# of a file in which we forgot dq_attach.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick clone quota
-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
+# Import common functions.
. ./common/reflink
. ./common/quota
. ./common/filter
_require_cp_reflink
_require_user
-rm -f $seqres.full
-
check_quota() {
du_total="$(du -ksc $SCRATCH_MNT/a $SCRATCH_MNT/b | tail -n 1 | awk '{print $1}')"
qu_total="$(_report_quota_blocks "-u $SCRATCH_MNT" | grep $qa_user | awk '{print $2}')"
# This is a general regression/stress test for numerous quota bugs with
# reflink and copy on write.
#
-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
+. ./common/preamble
+_begin_fstest auto stress clone quota
+# Override the default cleanup function.
_cleanup()
{
cd /
$KILLALL_PROG -9 fsstress > /dev/null 2>&1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/quota
. ./common/filter
. ./common/reflink
_require_quota
_require_command "$KILLALL_PROG" "killall"
-rm -f $seqres.full
-
report_quota_blocks() {
$XFS_QUOTA_PROG -x -c "report $1" $SCRATCH_MNT | \
awk '{x += $2;} END { print(x); }'
# blocks than expected, lead to block reservation overrun and free space
# accounting inconsistency.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick ioctl fsr punch
-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
+# Import common functions.
. ./common/filter
. ./common/punch
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# and the patch "xfs: detect agfl count corruption and reset agfl") for details
# about the fix.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-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()
-{
- cd /
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick
-rm -f $seqres.full
+_register_cleanup "_cleanup; rm -f $tmp.*"
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# the backing pages for freed inodes may still reside in the cache with the
# freed inodes in a partially initialized state.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick filestreams
-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
+# Import common functions.
. ./common/filter
. ./common/filestreams
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
drop_caches()
{
#
# checkbashisms on all /bin/sh scripts. This is a maintainer script.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+. ./common/preamble
+_begin_fstest auto quick
# get standard environment
-. ./common/rc
# real QA test starts here
_supported_fs xfs
test -z "$WORKAREA" && _notrun "Can't find xfsprogs source"
-rm -f $seqres.full
-
echo "Silence is golden"
find $WORKAREA -type f -name 'xfs*.sh' -print0 | xargs -0 grep '^#!.*/bin/sh' | sed -e 's/:.*$//g' | while read f; do
$CHECKBASHISMS_PROG $f
#
# Exercise mount vs superblock shrinker races.
#
-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
+. ./common/preamble
+_begin_fstest auto mount
+# Override the default cleanup function.
_cleanup()
{
cd /
echo 0 > /sys/fs/xfs/debug/mount_delay
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
# we should have non fatal asserts configured, because assert
# failures triggered by the intentional corrupt would crash system.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick fuzzers
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
#
# Make sure pretty printed XFS geometry is the same across all programs.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-rm -f $seqres.full
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# Make sure that the statfs b_avail counter doesn't change across remount
# after the rmapbt has grown in size.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick rmap
-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
+# Import common functions.
. ./common/filter
# remove previous \$seqres.full before test
-rm -f $seqres.full
# real QA test starts here
_supported_fs xfs
# Make sure xfs_repair can repair root inode parent's pointer
# when it contains a bogus ino when it's using shot form directory
-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/preamble
+_begin_fstest auto quick metadata repair
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
echo "Silence is golden"
# Test xfs_db by bad character in field list selector string. The issue
# has been fixed by xfsprogs 945e47e2.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto db
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# Modify as appropriate.
_supported_fs xfs
_require_scratch
# Populate a XFS filesystem and fuzz every superblock field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every AGF field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every AGFL field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every AGI field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every bnobt field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every bnobt key/pointer.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every cntbt field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every inobt field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every finobt field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every rmapbt field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every rmapbt key/pointer field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every refcountbt field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every btree-format directory inode field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every extents-format file inode field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every btree-format file inode field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every bmbt block field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every symlink remote block field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every inline directory inode field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every block-format dir block field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every data-format dir block field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every leaf1-format dir block field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every leafn-format dir block field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every node-format dir block field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every freeindex-format dir block field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every inline attr inode field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every leaf-format attr block field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every node-format attr block field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every external attr block field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every rtrmapbt record field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair realtime
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every rtrmapbt keyptr field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair realtime
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every refcountbt field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every btree-format attr inode field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every blockdev inode field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every local-format symlink inode field.
# Do not fix the filesystem, to test metadata verifiers.
-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 7 15
-
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
+
+_register_cleanup "_cleanup" BUS
+
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every user dquot field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every group dquot field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every project dquot field.
# Do not fix the filesystem, to test metadata verifiers.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# This case test same bug (upstream linux commit ee457001ed6c) as xfs/132, but
# through different code path.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test detection & fixing of bad summary block counts at mount time.
#
-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/preamble
+_begin_fstest auto quick fuzz
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
#
# Test detection & fixing of bad summary inode counts at mount time.
#
-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/preamble
+_begin_fstest auto quick fuzz
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
+. ./common/filter
# real QA test starts here
# Test detection & fixing of bad summary block counts at mount time.
# Corrupt the AGFs to test mount failure when mount-fixing fails.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick fuzz
-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
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Ensure that xfsprogs crc32 works correctly via xfs_io crc32cselftest command.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-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
+# Import common functions.
. ./common/filter
# real QA test starts here
# repair also doesn't crash when it hits a corrupt da btree with a zero before
# pointer.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every single-leafn-format dir block field.
# Use xfs_repair to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every single-leafn-format dir block field.
# Use xfs_scrub to fix the corruption.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_scrub dangerous_online_repair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# Populate a XFS filesystem and fuzz every single-leafn-format dir block field.
# Do not fix the filesystem, to test metadata verifiers.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest dangerous_fuzzers dangerous_norepair
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
. ./common/fuzzy
# which suggest that we forgot to TRACE_DEFINE_ENUM somewhere, which causes
# incomplete ftrace reporting.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
-_cleanup()
-{
- cd /
- rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs xfs
#
# Make sure we can't format a filesystem with insane extent hints.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick mkfs prealloc mkfs
testfile=$TEST_DIR/$seq.txt
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs xfs
_require_scratch_nocheck
-rm -f $seqres.full
-
# Try regular extent size hint
echo extszinherit >> $seqres.full
_scratch_mkfs -d extszinherit=8388608 >> $seqres.full 2>&1
# Here we force the use of the slow iunlink bucket walk code in a single
# threaded situation.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick unlink
testfile=$TEST_DIR/$seq.txt
-trap "_cleanup; exit \$status" 0 1 2 3 15
delay_knob="/sys/fs/xfs/debug/log_recovery_delay"
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/inject
# real QA test starts here
_require_scratch
_require_test_program "t_open_tmpfiles"
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
# Here we force the use of the slow iunlink bucket walk code, using every
# CPU possible.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-tmp=/tmp/$$
-status=1 # failure is the default!
+. ./common/preamble
+_begin_fstest auto quick unlink
testfile=$TEST_DIR/$seq.txt
-trap "_cleanup; exit \$status" 0 1 2 3 15
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/inject
. ./common/filter
_require_scratch
_require_test_program "t_open_tmpfiles"
-rm -f $seqres.full
-
_scratch_mkfs | _filter_mkfs 2> $tmp.mkfs > /dev/null
cat $tmp.mkfs >> $seqres.full
. $tmp.mkfs
# Populate a XFS filesystem and ensure that metadump, mdrestore, and copy
# all work properly.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto copy metadump
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.* $testdir
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/populate
# theory it should allow this (labels are a sequence of arbitrary bytes)
# even if the user implications are horrifying.
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto quick mkfs label
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
_supported_fs xfs
#
# Ensure all xfs_spaceman commands are documented.
-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/preamble
+_begin_fstest auto quick spaceman
+
+# Import common functions.
# real QA test starts here
_supported_fs xfs
#
# Basic tests of the xfs_spaceman health command.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick health
-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
+# Import common functions.
. ./common/fuzzy
. ./common/filter
_require_scrub
_require_xfs_spaceman_command "health"
-rm -f $seqres.full
-
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount
_scratch_cycle_mount # make sure we haven't run quotacheck on this mount
# reflinking it, and retouching every written byte to see if we can create
# enough speculative COW reservations to overflow i_delayed_blks.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest clone
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/reflink
. ./common/filter
# commit b136f48b19a5 ("xfs_quota: fix false error reporting of project
# inheritance flag is not set")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
_require_scratch
# bulkstat batch sizes. Test v1 and v5 ioctls explicitly, as well as the
# ioctl version autodetection code in libfrog.
#
-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.*
-}
+. ./common/preamble
+_begin_fstest auto ioctl
bstat_versions()
{
}
# Get standard environment, filters and checks
-. ./common/rc
. ./common/filter
_require_scratch
_supported_fs xfs
-rm -f $seqres.full
-
DIRCOUNT=8
INOCOUNT=$((2048 / DIRCOUNT))
# This is a regression test for commit f16fe3ecde62 ("xfs: bulkstat should copy
# lastip whenever userspace supplies one")
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto ioctl quick
-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
+# Import common functions.
. ./common/filter
_require_test_program "bulkstat_null_ocount"
_supported_fs xfs
-rm -f $seqres.full
-
echo "Silence is golden."
$here/src/bulkstat_null_ocount $TEST_DIR
# Test statfs when project quota is set.
# Uncover de7243057 fs/xfs: fix f_ffree value for statfs when project quota is set
#
-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
+. ./common/preamble
+_begin_fstest auto quick quota
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/quota
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
_require_scratch
# Ensure that removing the access ACL through the XFS-specific attr name removes
# the cached ACL as well
#
-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
+. ./common/preamble
+_begin_fstest auto quick acl attr
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $FILE
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/attr
#
# XFS mount options sanity check, refer to 'man 5 xfs'.
#
-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
+. ./common/preamble
+_begin_fstest auto mount
+# Override the default cleanup function.
_cleanup()
{
cd /
rmdir $LOOP_MNT
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
_require_test
#
# Ensure all xfs_db commands are documented.
-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
+. ./common/preamble
+_begin_fstest auto quick db
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $file
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs xfs
#
# Ensure all xfs_quota commands are documented.
-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
+. ./common/preamble
+_begin_fstest auto quick quota
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $file
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
# real QA test starts here
_supported_fs xfs
# Update sunit and width and make sure that the filesystem still passes
# xfs_repair afterwards.
-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
+. ./common/preamble
+_begin_fstest auto quick
+# Override the default cleanup function.
_cleanup()
{
rm -f $tmp.*
cd /
}
-rm -f $seqres.full
-
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/fuzzy
# real QA test starts here
#
# Race freeze and fsmap for a while to see if we crash or livelock.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick fsmap freeze
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 7 15
+_register_cleanup "_cleanup" BUS
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -rf $tmp.*
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/fuzzy
. ./common/inject
# Make sure that the quota default grace period and maximum warning limits
# survive quotacheck.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick quota
-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
+# Import common functions.
. ./common/filter
. ./common/quota
_require_scratch
_require_quota
-rm -f $seqres.full
-
# Format filesystem and set up quota limits
_scratch_mkfs > $seqres.full
_qmount_option "usrquota"
# that it actually forced the log by immediately shutting down the fs without
# flushing the log and then remounting to check file contents.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick reflink
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
_require_scratch_reflink
_require_cp_reflink
-rm -f $seqres.full
-
# Format filesystem and set up quota limits
_scratch_mkfs > $seqres.full
_scratch_mount -o wsync >> $seqres.full
# commit d0c7feaf8767 ("xfs: add agf freeblocks verify in xfs_agf_verify")
# is included in the current kernel.
#
-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
+. ./common/preamble
+_begin_fstest auto quick reflink
+# Override the default cleanup function.
_cleanup()
{
cd /
_scratch_unmount > /dev/null 2>&1
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
# xfs: make xfs_growfs_rt update secondary superblocks
# xfs: annotate grabbing the realtime bitmap/summary locks in growfs
#
-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
+. ./common/preamble
+_begin_fstest auto quick realtime growfs
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $TEST_DIR/$seq.rtvol
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# Feed valid mkfs config files to the mkfs parser to ensure that they are
# recognized as valid.
#
-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
+. ./common/preamble
+_begin_fstest auto quick mkfs
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $def_cfgfile $fsimg
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# Feed invalid mkfs config files to the mkfs parser to ensure that they are
# recognized as invalid.
#
-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
+. ./common/preamble
+_begin_fstest auto quick mkfs
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $def_cfgfile $fsimg
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test formatting with a well known config file.
#
-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
+. ./common/preamble
+_begin_fstest auto quick mkfs
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $def_cfgfile $fsimg
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test formatting with a config file that contains conflicting options.
#
-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
+. ./common/preamble
+_begin_fstest auto quick mkfs
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $def_cfgfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
#
# Test formatting with conflicts between the config file and the cli.
#
-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
+. ./common/preamble
+_begin_fstest auto quick mkfs
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $def_cfgfile
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
# Modify as appropriate.
# xfs: fix incorrect root dquot corruption error when switching group/project
# quota types
-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/preamble
+_begin_fstest auto quick quota
+
+# Import common functions.
. ./common/quota
# real QA test starts here
_require_scratch
_require_check_dmesg
-rm -f $seqres.full
-
echo "Format filesystem" | tee -a $seqres.full
_scratch_mkfs > $seqres.full
# Make sure that regular fallocate functions work ok when the realtime extent
# size is and isn't a power of 2.
#
-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
+. ./common/preamble
+_begin_fstest auto quick rw realtime
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $TEST_DIR/$seq.rtvol
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
# real QA test starts here
# adding a single extent while there's no possibility of splitting an existing
# mapping.
-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/preamble
+_begin_fstest auto quick quota
+
+# Import common functions.
. ./common/filter
. ./common/quota
. ./common/inject
. ./common/populate
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
# Verify that XFS does not cause bitmap/summary inode fork's extent count to
# overflow when growing an the realtime volume of the filesystem.
#
-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
+. ./common/preamble
+_begin_fstest auto quick realtime growfs
+# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.* $TEST_DIR/$seq.rtvol
}
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/inject
. ./common/populate
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
#
# Verify that XFS does not cause inode fork's extent count to overflow when
# punching out an extent.
-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/preamble
+_begin_fstest auto quick punch zero insert collapse
+
+# Import common functions.
. ./common/filter
. ./common/inject
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
#
# Verify that XFS does not cause inode fork's extent count to overflow when
# adding/removing xattrs.
-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/preamble
+_begin_fstest auto quick attr
+
+# Import common functions.
. ./common/filter
. ./common/attr
. ./common/inject
. ./common/populate
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
#
# Verify that XFS does not cause inode fork's extent count to overflow when
# adding/removing directory entries.
-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/preamble
+_begin_fstest auto quick dir hardlink symlink
+
+# Import common functions.
. ./common/filter
. ./common/inject
. ./common/populate
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
#
# Verify that XFS does not cause inode fork's extent count to overflow when
# writing to an unwritten extent.
-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/preamble
+_begin_fstest auto quick
+
+# Import common functions.
. ./common/filter
. ./common/inject
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
#
# Verify that XFS does not cause inode fork's extent count to overflow when
# writing to a shared extent.
-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/preamble
+_begin_fstest auto quick reflink
+
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
#
# Verify that XFS does not cause inode fork's extent count to overflow when
# remapping extents from one file's inode fork to another.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick reflink
-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
+# Import common functions.
. ./common/filter
. ./common/reflink
. ./common/inject
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
#
# Verify that XFS does not cause inode fork's extent count to overflow when
# swapping forks between files
-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/preamble
+_begin_fstest auto quick
+
+# Import common functions.
. ./common/filter
. ./common/inject
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
#
# Execute fsstress with bmap_alloc_minlen_extent error tag enabled.
#
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto stress
-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
+# Import common functions.
. ./common/filter
. ./common/inject
. ./common/populate
-# remove previous $seqres.full before test
-rm -f $seqres.full
-
# real QA test starts here
_supported_fs xfs
# Regression test for commit:
# xfs: Skip repetitive warnings about mount options
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest auto quick mount
-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
-
-# remove previous $seqres.full before test
-rm -f $seqres.full
+# Import common functions.
_require_check_dmesg
_supported_fs xfs
echo "Silence is golden."
-
# Skip old kernels that did not print the warning yet
log_tag
_scratch_mkfs > $seqres.full 2>&1