@@ -219,41 +219,42 @@ _require_tape()
#
# Cleanup created dirs and files
-# Called by trap
-#
+# Called by trap, needs to call generic cleanup when done.
_cleanup_dump()
{
- # Some tests include this before checking _supported_fs xfs
- # and the sleeps & checks here get annoying
- if [ "$FSTYP" != "xfs" ]; then
- return
- fi
+ # Some tests include this before checking _supported_fs xfs
+ # and the sleeps & checks here get annoying
+ if [ "$FSTYP" != "xfs" ]; then
+ return
+ fi
- cd $here
+ cd $here
+
+ if [ -n "$DEBUGDUMP" ]; then
+ # save it for inspection
+ for dir in /var/xfsdump/inventory /var/lib/xfsdump/inventory; do
+ [ -d $dir ] || continue
+ tar -cvf $seqres.inventory.tar $dir
+ ls -nR $dir >$seqres.inventory.ls
+ done
+ fi
- if [ -n "$DEBUGDUMP" ]; then
- # save it for inspection
+ # put inventory dir back
for dir in /var/xfsdump/inventory /var/lib/xfsdump/inventory; do
- [ -d $dir ] || continue
- tar -cvf $seqres.inventory.tar $dir
- ls -nR $dir >$seqres.inventory.ls
+ [ -d $dir.$seq ] || continue
+ rm -rf $dir # get rid of new one
+ mv $dir.$seq $dir
done
- fi
- # put inventory dir back
- for dir in /var/xfsdump/inventory /var/lib/xfsdump/inventory; do
- [ -d $dir.$seq ] || continue
- rm -rf $dir # get rid of new one
- mv $dir.$seq $dir
- done
+ if [ -f ${RESULT_DIR}/require_scratch ] && [ $status -ne $NOTRUNSTS ]; then
+ # Sleep added to stop _check_scratch_fs from complaining that
+ # the scratch_dev is still busy
+ sleep 10
- if [ -f ${RESULT_DIR}/require_scratch ] && [ $status -ne $NOTRUNSTS ]; then
- # Sleep added to stop _check_scratch_fs from complaining that the
- # scratch_dev is still busy
- sleep 10
+ _check_scratch_fs
+ fi
- _check_scratch_fs
- fi
+ _cleanup
}
#
@@ -9,20 +9,11 @@
#
# Use fsstress to create a directory structure with a mix of files
#
-seqfull=$0
. ./common/preamble
_begin_fstest dump ioctl tape
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -42,4 +33,5 @@ _do_restore | sed -e "/entries processed$/s/[0-9][0-9]*/NUM/g"
_ls_compare_sub
# success, all done
+status=0
exit
@@ -7,21 +7,11 @@
# To test xfsdump/restore to tape using a directory with
# files with data created by src/fill.
#
-seqfull=$0
. ./common/preamble
_begin_fstest dump ioctl tape
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -38,4 +28,5 @@ _diff_compare_sub
_ls_compare_sub
# success, all done
+status=0
exit
@@ -9,17 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl tape
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -42,4 +33,5 @@ _do_restore
_diff_compare
# success, all done
+status=0
exit
@@ -9,17 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl tape
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -35,4 +26,5 @@ _do_restore_min
_diff_compare
# success, all done
+status=0
exit
@@ -9,17 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -33,4 +24,5 @@ _do_restore_file
_diff_compare
# success, all done
+status=0
exit
@@ -9,17 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -32,4 +23,5 @@ _do_dump_restore
_diff_compare_sub
# success, all done
+status=0
exit
@@ -9,17 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -56,4 +47,5 @@ _do_invutil -F
_dump_inventory
# success, all done
+status=0
exit
@@ -10,16 +10,8 @@ seqfull=$0
. ./common/preamble
_begin_fstest dump ioctl tape auto
-# Override the default cleanup function.
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -10,15 +10,8 @@ seqfull=$0
. ./common/preamble
_begin_fstest dump ioctl remote tape
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -9,16 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl remote tape
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
-
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -9,15 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl remote tape
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -10,15 +10,8 @@ seqfull=$0
. ./common/preamble
_begin_fstest dump ioctl remote tape
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -12,15 +12,8 @@ seqfull=$0
. ./common/preamble
_begin_fstest dump ioctl tape
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -9,15 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -9,15 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -10,15 +10,8 @@ seqfull=$0
. ./common/preamble
_begin_fstest dump ioctl remote tape
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -10,17 +10,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -9,17 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -36,4 +27,5 @@ _ls_compare_sub
_diff_compare
# success, all done
+status=0
exit
@@ -9,17 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -42,4 +33,5 @@ _ls_compare_sub
_diff_compare
# success, all done
+status=0
exit
@@ -9,17 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -40,4 +31,5 @@ _diff_compare_sub
_ls_nodate_compare_sub
# success, all done
+status=0
exit
@@ -9,16 +9,11 @@
. ./common/preamble
_begin_fstest dump attr auto quick
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
+. ./common/dump
+_register_cleanup _cleanup_dump
# Import common functions.
. ./common/filter
-. ./common/dump
. ./common/attr
# real QA test starts here
@@ -9,16 +9,11 @@
. ./common/preamble
_begin_fstest dump auto
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
+. ./common/dump
+_register_cleanup _cleanup_dump
# Import common functions.
. ./common/filter
-. ./common/dump
_ls_size_filter()
{
@@ -12,16 +12,11 @@
. ./common/preamble
_begin_fstest dump auto
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
+. ./common/dump
+_register_cleanup _cleanup_dump
# Import common functions.
. ./common/filter
-. ./common/dump
. ./common/quota
#
@@ -9,16 +9,11 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-# Import common functions.
-. ./common/filter
. ./common/dump
+_register_cleanup _cleanup_dump
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
+# Import common functions.
+. ./common/filter
# real QA test starts here
_supported_fs xfs
@@ -10,20 +10,11 @@
# Test for regression caused by
# c7cb51d xfs: fix error handling at xfs_inumbers
#
-seqfull=$0
. ./common/preamble
_begin_fstest auto stress dump
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -44,4 +35,5 @@ _count_restoredir_files | tee $tmp.after >> $seqres.full
diff -u $tmp.before $tmp.after
# success, all done
+status=0
exit
@@ -9,14 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
+. ./common/dump
+_register_cleanup _cleanup_dump
#
# Add a new file and append a subset of the fill'ed files
@@ -44,9 +38,6 @@ filter_cumulative_quota_updates() {
{print}'
}
-# Import common functions.
-. ./common/dump
-
# real QA test starts here
_supported_fs xfs
_require_scratch
@@ -71,4 +62,5 @@ _ls_compare_sub
_diff_compare
# success, all done
+status=0
exit
@@ -9,16 +9,9 @@
. ./common/preamble
_begin_fstest dump ioctl tape
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
+. ./common/dump
+_register_cleanup _cleanup_dump
-#
# create a 40 MiB file with an extended attr.
# xfsdump writes file data in "extent groups", currently 16 MiB in size. After
# writing an extent group or finishing a file, xfsdump will start a new media
@@ -38,7 +31,6 @@ End-of-File
}
# Import common functions.
-. ./common/dump
. ./common/attr
# real QA test starts here
@@ -59,4 +51,5 @@ _diff_compare
_diff_compare_eas
# success, all done
+status=0
exit
@@ -11,14 +11,8 @@
. ./common/preamble
_begin_fstest dump ioctl tape
-status=0 # success is the default!
-
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
+. ./common/dump
+_register_cleanup _cleanup_dump
# create two 12 MiB files with extended attrs.
# xfsdump writes file data in "extent groups", currently 16 MiB in size. After
@@ -40,7 +34,6 @@ End-of-File
}
# Import common functions.
-. ./common/dump
. ./common/attr
# real QA test starts here
@@ -61,4 +54,5 @@ _diff_compare
_diff_compare_eas
# success, all done
+status=0
exit
@@ -9,15 +9,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -11,15 +11,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -11,15 +11,8 @@
. ./common/preamble
_begin_fstest dump ioctl auto quick
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
-
-# Import common functions.
. ./common/dump
+_register_cleanup _cleanup_dump
# real QA test starts here
_supported_fs xfs
@@ -10,16 +10,11 @@
. ./common/preamble
_begin_fstest auto dump quota quick
-# Import common functions.
-. ./common/quota
. ./common/dump
+_register_cleanup _cleanup_dump
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
+# Import common functions.
+. ./common/quota
_print_projid()
{
@@ -9,20 +9,13 @@
. ./common/preamble
_begin_fstest dump auto quick
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
+. ./common/dump
+_register_cleanup _cleanup_dump
# Import common functions.
. ./common/filter
-. ./common/dump
# real QA test starts here
-
-# Modify as appropriate.
_supported_fs xfs
_require_scratch
_require_command "$SETCAP_PROG" setcap
@@ -9,21 +9,14 @@
. ./common/preamble
_begin_fstest auto dump
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
+. ./common/dump
+_register_cleanup _cleanup_dump
# Import common functions.
. ./common/filter
-. ./common/dump
. ./common/attr
# real QA test starts here
-
-# Modify as appropriate.
_supported_fs xfs
_require_scratch
_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed"
@@ -9,20 +9,13 @@
. ./common/preamble
_begin_fstest auto dump
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
-_register_cleanup _dump_cleanup
+. ./common/dump
+_register_cleanup _cleanup_dump
# Import common functions.
. ./common/filter
-. ./common/dump
# real QA test starts here
-
-# Modify as appropriate.
_supported_fs xfs
_require_scratch
_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed"
@@ -10,27 +10,21 @@
. ./common/preamble
_begin_fstest auto quick dump
-_dump_cleanup()
-{
- _cleanup_dump
- _cleanup
-}
+. ./common/dump
local_cleanup()
{
$UMOUNT_PROG $TEST_DIR/dest.$seq 2> /dev/null
rmdir $TEST_DIR/src.$seq 2> /dev/null
rmdir $TEST_DIR/dest.$seq 2> /dev/null
- _dump_cleanup
+ _cleanup_dump
}
_register_cleanup local_cleanup
# Import common functions.
. ./common/filter
-. ./common/dump
# real QA test starts here
-
_supported_fs xfs
# Setup