@@ -45,9 +45,6 @@ session_label="stress_$seq"
nobody=4 # define this uid/gid as a number
do_quota_check=true # do quota check if quotas enabled
-# install our cleaner
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
# start inventory from a known base - move it aside for test
for dir in /var/xfsdump/inventory /var/lib/xfsdump/inventory; do
if [ -d $dir ]; then
@@ -227,7 +224,7 @@ _wipe_fs()
# Cleanup created dirs and files
# Called by trap
#
-_cleanup()
+_cleanup_dump()
{
# Some tests include this before checking _supported_fs xfs
# and the sleeps & checks here get annoying
@@ -236,7 +233,6 @@ _cleanup()
fi
cd $here
- rm -f $tmp.*
if [ -n "$DEBUGDUMP" ]; then
# save it for inspection
@@ -17,7 +17,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
. ./common/rc
. ./common/dump
@@ -15,7 +15,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -14,7 +14,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -14,7 +14,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -14,7 +14,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -16,7 +16,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -14,7 +14,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -14,7 +14,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -13,7 +13,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -16,7 +16,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -22,6 +22,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
+ _cleanup_dump
cd /
rm -f $tmp.*
}
@@ -18,7 +18,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
. ./common/rc
. ./common/dump
@@ -13,7 +13,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
#
# Add a new file and append a subset of the fill'ed files
@@ -13,7 +13,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
#
# create a 40 MiB file with an extended attr.
@@ -15,7 +15,14 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
#
# create two 12 MiB files with extended attrs.
@@ -13,7 +13,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -15,7 +15,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -15,7 +15,14 @@ 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
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+ _cleanup_dump
+ cd /
+ rm -f $tmp.*
+}
# get standard environment, filters and checks
. ./common/rc
@@ -23,8 +23,8 @@ rm -f $seqres.full
_cleanup()
{
+ _cleanup_dump
cd /
- _scratch_unmount 2>/dev/null
rm -rf $tmp.*
}
@@ -17,6 +17,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
+ _cleanup_dump
cd /
rm -f $tmp.*
}
@@ -17,6 +17,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
+ _cleanup_dump
cd /
rm -f $tmp.*
}
@@ -17,6 +17,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
+ _cleanup_dump
cd /
rm -f $tmp.*
}
Instead, call _cleanup_dump explicitly from a private _cleanup. Remove the generic cleanup bits (rm $tmp.*) from _cleanup_dump. The only xfs/dump test that had anything other than rm $tmp.* in _cleanup in xfs/287, but that was _scratch_unmount, which is not needed anyway. Signed-off-by: Amir Goldstein <amir73il@gmail.com> --- common/dump | 6 +----- tests/xfs/022 | 9 ++++++++- tests/xfs/023 | 9 ++++++++- tests/xfs/024 | 9 ++++++++- tests/xfs/025 | 9 ++++++++- tests/xfs/026 | 9 ++++++++- tests/xfs/027 | 9 ++++++++- tests/xfs/028 | 9 ++++++++- tests/xfs/035 | 9 ++++++++- tests/xfs/036 | 9 ++++++++- tests/xfs/037 | 9 ++++++++- tests/xfs/038 | 9 ++++++++- tests/xfs/039 | 9 ++++++++- tests/xfs/043 | 9 ++++++++- tests/xfs/046 | 9 ++++++++- tests/xfs/047 | 9 ++++++++- tests/xfs/055 | 9 ++++++++- tests/xfs/056 | 9 ++++++++- tests/xfs/059 | 9 ++++++++- tests/xfs/060 | 9 ++++++++- tests/xfs/061 | 9 ++++++++- tests/xfs/063 | 9 ++++++++- tests/xfs/064 | 9 ++++++++- tests/xfs/065 | 9 ++++++++- tests/xfs/066 | 1 + tests/xfs/068 | 9 ++++++++- tests/xfs/266 | 9 ++++++++- tests/xfs/267 | 9 ++++++++- tests/xfs/268 | 9 ++++++++- tests/xfs/281 | 9 ++++++++- tests/xfs/282 | 9 ++++++++- tests/xfs/283 | 9 ++++++++- tests/xfs/287 | 2 +- tests/xfs/296 | 1 + tests/xfs/301 | 1 + tests/xfs/302 | 1 + 36 files changed, 246 insertions(+), 36 deletions(-)