mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common/dump: do not override test cleanup trap
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> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
committed by
Eryu Guan
parent
f479ce6186
commit
6d17c9076f
+1
-5
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
+8
-1
@@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user