3. By default, tests are run as the same uid as the person
executing the control script "check" that runs the test scripts.
- If you need to be root, add a call to the shell procedure
- _need_to_be_root ... this will do nothing or exit with an
- error message depending on your current uid.
-
4. Some other useful shell procedures:
_get_fqdn - echo the host's fully qualified
nobody=4 # define this uid/gid as a number
do_quota_check=true # do quota check if quotas enabled
-_need_to_be_root
-
# install our cleaner
trap "_cleanup; exit \$status" 0 1 2 3 15
'
}
-# check if run as root
-#
-_need_to_be_root()
-{
- id=`id | $SED_PROG -e 's/(.*//' -e 's/.*=//'`
- if [ "$id" -ne 0 ]
- then
- echo "Arrgh ... you need to be root (not uid=$id) to run this test"
- exit 1
- fi
-}
-
-
#
# _df_device : get an IRIX style df line for a given device
#
. ./common/rc
. ./common/filter
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
. ./common/rc
. ./common/filter
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_require_scratch_nocheck
_require_scratch_dev_pool 4
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
_supported_fs btrfs
_supported_os Linux
_require_scratch
-_need_to_be_root
rm -f $seqres.full
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
_require_test
_require_scratch
_require_cp_reflink
-_need_to_be_root
reflink_test_dir=$TEST_DIR/test-$seq
rm -rf $reflink_test_dir
_supported_os Linux
_require_scratch
_require_fssum
-_need_to_be_root
rm -f $seqres.full
_require_test
_require_scratch
_require_cp_reflink
-_need_to_be_root
_checksum_files()
{
_supported_fs btrfs
_supported_os Linux
_require_scratch
-_need_to_be_root
rm -f $seqres.full
_supported_fs btrfs
_supported_os Linux
_require_scratch
-_need_to_be_root
rm -f $seqres.full
_supported_os Linux
_require_scratch
_require_fssum
-_need_to_be_root
rm -f $seqres.full
_supported_os Linux
_require_scratch
_require_fssum
-_need_to_be_root
rm -f $seqres.full
_supported_os Linux
_require_scratch
_require_fssum
-_need_to_be_root
rm -f $seqres.full
_supported_os Linux
_require_test
_require_scratch
-_need_to_be_root
rm -f $seqres.full
mkdir $restore_dir
_supported_os Linux
_require_scratch
_require_fssum
-_need_to_be_root
rm -f $seqres.full
_supported_os Linux
_require_scratch
_require_fssum
-_need_to_be_root
rm -f $seqres.full
_supported_os Linux
_require_scratch
_require_fssum
-_need_to_be_root
rm -f $seqres.full
_require_test
_require_scratch
_require_fssum
-_need_to_be_root
rm -f $seqres.full
rm -fr $send_files_dir
_require_fssum
_require_xfs_io_command "fiemap"
_require_btrfs_send_stream_version
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
_require_test
_require_scratch
_require_btrfs "property"
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
# real QA test starts here
_supported_fs btrfs
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_test
_require_scratch
_require_fssum
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
_require_test
_require_scratch
_require_fssum
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
_supported_os Linux
_require_scratch
_require_cloner
-_need_to_be_root
rm -f $seqres.full
_require_scratch
_require_fssum
_require_attrs
-_need_to_be_root
# max(16384, PAGE_SIZE) is the default leaf/node size on btrfs-progs v3.12+.
# Older versions just use max(4096, PAGE_SIZE).
_supported_os Linux
_require_test
_require_scratch
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
_require_cloner
_require_btrfs_fs_feature "no_holes"
_require_btrfs_mkfs_feature "no-holes"
-_need_to_be_root
rm -f $seqres.full
_require_btrfs_fs_feature "no_holes"
_require_btrfs_mkfs_feature "no-holes"
_require_dm_target flakey
-_need_to_be_root
rm -f $seqres.full
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
# Requiring flink command tests for the presence of the -T option used
# to pass O_TMPFILE to open(2).
_require_xfs_io_command "flink"
-_need_to_be_root
rm -f $seqres.full
_require_test
_require_scratch
_require_btrfs "property"
-_need_to_be_root
rm -f $seqres.full
_supported_os Linux
_require_test
_require_scratch
-_need_to_be_root
rm -f $seqres.full
_supported_os Linux
_require_scratch
_require_fssum
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
_supported_fs btrfs
_supported_os Linux
_require_scratch
-_need_to_be_root
# Since xfs_io's fiemap always use SYNC flag and can't be unset,
# we must use filefrag to call fiemap without SYNC flag.
_require_command "/usr/sbin/filefrag" filefrag
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch_nocheck
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
_supported_os Linux
_require_scratch
_require_fssum
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
_supported_os Linux
_require_scratch
_require_fssum
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
_supported_os Linux
_require_scratch
_require_dm_target flakey
-_need_to_be_root
BTRFS_DEBUG_TREE_PROG="`set_prog_path btrfs-debug-tree`"
_require_command "$BTRFS_DEBUG_TREE_PROG" btrfs-debug-tree
_supported_os Linux
_require_scratch
_require_cloner
-_need_to_be_root
rm -f $seqres.full
_supported_os Linux
_require_scratch
_require_fssum
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
_supported_os Linux
_require_scratch
_require_fail_make_request
-_need_to_be_root
SYSFS_BDEV=`_sysfs_dev $SCRATCH_DEV`
# real QA test starts here
# Modify as appropriate.
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
_supported_os Linux
_require_scratch
_require_fssum
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
_supported_os Linux
_require_scratch
_require_cloner
-_need_to_be_root
rm -f $seqres.full
_supported_os Linux
_require_scratch
_require_cloner
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
. ./common/dmflakey
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
_supported_os Linux
_require_scratch
_require_cloner
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
. ./common/dmflakey
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
_supported_fs btrfs
_supported_os Linux
_require_scratch
-_need_to_be_root
# Use big blocksize to ensure there is still enough space left for metadata
# space reserve.
_supported_fs btrfs
_supported_os Linux
-_need_to_be_root
_require_scratch_dev_pool 3
_require_dm_target error
_supported_fs btrfs
_supported_os Linux
-_need_to_be_root
_require_scratch_dev_pool 3
_require_btrfs_dev_del_by_devid
_require_dm_target error
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
_supported_fs btrfs
_supported_os Linux
_require_scratch
-_need_to_be_root
rm -f $seqres.full
_supported_fs btrfs
_supported_os Linux
_require_scratch
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
md5sum $SCRATCH_MNT/mysnap2_ro/foo/bar | _filter_scratch
status=0
-exit
\ No newline at end of file
+exit
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
_supported_fs btrfs
_supported_os Linux
_require_scratch
-_need_to_be_root
# Use 64K file size to match any sectorsize
# And with a unaligned tailing range to ensure it will be at least 2 pages
_supported_fs btrfs
_supported_os Linux
_require_scratch
-_need_to_be_root
_require_cp_reflink
_require_xfs_io_command "fpunch"
_supported_fs btrfs
_supported_os Linux
_require_scratch
-_need_to_be_root
_require_cp_reflink
send_files_dir=$TEST_DIR/btrfs-test-$seq
_supported_fs btrfs
_supported_os Linux
_require_scratch
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
_supported_fs btrfs
_supported_os Linux
_require_scratch
-_need_to_be_root
send_files_dir=$TEST_DIR/btrfs-test-$seq
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs btrfs
_supported_os Linux
_require_scratch
_supported_os Linux
_require_scratch
_require_cp_reflink
-_need_to_be_root
rm -f $seqres.full
# real QA test starts here
_supported_fs ext4
_supported_os Linux
-_need_to_be_root
_require_scratch
rm -f $seqres.full
# real QA test starts here
_supported_os Linux
_supported_fs ext4
-_need_to_be_root
_require_scratch
_require_defrag
# real QA test starts here
_supported_os Linux
_supported_fs ext4
-_need_to_be_root
_require_scratch
_require_defrag
# real QA test starts here
_supported_os Linux
_supported_fs ext4
-_need_to_be_root
_require_scratch
_require_defrag
# real QA test starts here
_supported_os Linux
_supported_fs ext4
-_need_to_be_root
_require_scratch
_require_defrag
_supported_fs generic
_supported_fs ext4
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_defrag
_require_xfs_io_command "falloc"
# real QA test starts here
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_defrag
_require_xfs_io_command "falloc"
. ./common/filter
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_fail_make_request
_supported_os Linux
_require_test
_require_scratch
-_need_to_be_root
_acl_setup_ids
_require_acls
_require_acl_get_max
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
. ./common/attr
# real QA test starts here
-_need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_attrs
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_xfs_io_command "falloc"
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
rm -f $seqres.full
-_need_to_be_root
-
echo "QA output created by $seq"
echo ""
file=$TEST_DIR/$seq.file
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
. ./common/dmflakey
# real QA test starts here
-_need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
. ./common/filter
# real QA test starts here
-_need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
. ./common/dmflakey
# real QA test starts here
-_need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
. ./common/dmflakey
# real QA test starts here
-_need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
. ./common/dmflakey
# real QA test starts here
-_need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
. ./common/dmflakey
# real QA test starts here
-_need_to_be_root
_supported_fs generic
_supported_os Linux
_require_scratch
_require_test
_require_user
-_need_to_be_root
test_root=$TEST_DIR/$seq.$$.root
test_user=$TEST_DIR/$seq.$$.user
_require_scratch
_require_quota
_require_user
-_need_to_be_root
test_files()
{
_require_scratch
_require_quota
_require_user
-_need_to_be_root
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount "-o usrquota,grpquota"
_supported_os Linux
_require_scratch
_require_quota
-_need_to_be_root
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount "-o usrquota,grpquota"
_require_scratch
_require_quota
_require_user
-_need_to_be_root
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount "-o usrquota,grpquota"
_supported_os Linux #IRIX
_require_scratch
_require_quota
-_need_to_be_root
# real QA test starts here
rm -f $seqres.full
_require_scratch
_require_quota
_require_user
-_need_to_be_root
# real QA test starts here
rm -f $seqres.full
rm -f $seqres.full
-_need_to_be_root
_acl_setup_ids
_require_acls
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_need_to_be_root
_require_dm_target error
rm -f $seqres.full
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_need_to_be_root
_require_dm_target error
rm -f $seqres.full
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_need_to_be_root
_require_dm_target error
rm -f $seqres.full
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_need_to_be_root
_require_dm_target error
rm -f $seqres.full
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
rm -f $seqres.full
_supported_os Linux
_require_quota
_require_user
-_need_to_be_root
_require_scratch
rm -f $seqres.full
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_need_to_be_root
_require_dm_target error
_require_odirect
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_need_to_be_root
_require_dm_target error
_require_odirect
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_need_to_be_root
_require_dm_target error
_require_odirect
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_need_to_be_root
_require_dm_target error
_require_odirect
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_need_to_be_root
_require_dm_target error
rm -f $seqres.full
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_need_to_be_root
_require_dm_target error
rm -f $seqres.full
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_need_to_be_root
_require_dm_target error
rm -f $seqres.full
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_need_to_be_root
_require_dm_target error
rm -f $seqres.full
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_odirect
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_odirect
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch_nocheck
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
_require_test
_require_acls
_require_user
-_need_to_be_root
rm -rf $TEST_DIR/$seq-dir
rm -f $seqres.full
_require_scratch
-_need_to_be_root
_require_user
_require_ugid_map
_require_userns
rm -f $seqres.full
_require_scratch
-_need_to_be_root
_acl_setup_ids
_require_acls
_require_ugid_map
_supported_fs generic
_require_acls
_require_scratch
-_need_to_be_root
rm -f $seqres.full
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch_nocheck
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch_nocheck
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# real QA test starts here
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_defrag
_require_xfs_io_command "falloc"
# real QA test starts here
_supported_fs generic
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_metadata_journaling $SCRATCH_DEV
# less than 1000 xattrs with very small values.
_supported_fs btrfs xfs
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_dm_target flakey
_require_attrs
rm -f $seqres.full
-_need_to_be_root
_acl_setup_ids
_require_acls
# real QA test starts here
_supported_fs ext3 ext4
_supported_os Linux
-_need_to_be_root
_require_scratch
rm -f $seqres.full
status=0 # success is the default!
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-_need_to_be_root
-
# real QA test starts here
_supported_fs xfs
_supported_os IRIX Linux
_supported_fs xfs
_supported_os IRIX Linux
-_need_to_be_root
_require_scratch
_require_no_large_scratch_dev
_supported_fs xfs
_supported_os Linux
-_need_to_be_root
_require_attrs
_require_acls
_require_scratch
_require_scratch
_require_attrs
-_need_to_be_root
rm -f $seqres.full
_supported_fs xfs
_supported_os Linux
-_need_to_be_root
_require_scratch
_require_noattr2