# 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 /
rm -f $tmp.*
+ _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
+. ./common/module
# real QA test starts here
_supported_fs btrfs
_require_test
_require_scratch_dev_pool 2
+_require_btrfs_forget_or_module_loadable
_scratch_dev_pool_get 2
od -x $SCRATCH_MNT/bar
_scratch_dev_pool_put
+_btrfs_rescan_devices
# success, all done
status=0