XFSQA 073 is still not correctly cleaning up $tmp,

this is because $tmp.source_dir is not an empty dir.

This change recursively deletes everything in $tmp.source_dir.
Not required for $tmp.loop as it is used as a loopback mountpoint.

the ignore external MKFS_OPTIONS change is no longer required,
as _scratch_mkfs_xfs now handles conflicting options.
Merge of master-melb:xfs-cmds:28863a by kenmcd.

  cleanup tmp and don't kill mkfs options
This commit is contained in:
David Disseldorp
2007-06-08 16:24:08 +00:00
parent 888b474e69
commit 1d315d6785
+1 -2
View File
@@ -22,7 +22,7 @@ _cleanup()
umount $SCRATCH_MNT 2>/dev/null umount $SCRATCH_MNT 2>/dev/null
umount $tmp.loop 2>/dev/null umount $tmp.loop 2>/dev/null
[ -d $tmp.loop ] && rmdir $tmp.loop [ -d $tmp.loop ] && rmdir $tmp.loop
[ -d $tmp.source_dir ] && rmdir $tmp.source_dir [ -d $tmp.source_dir ] && rm -rf $tmp.source_dir
rm -f $tmp.* /var/tmp/xfs_copy.log.* rm -f $tmp.* /var/tmp/xfs_copy.log.*
} }
trap "_cleanup; exit \$status" 0 1 2 3 15 trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -114,7 +114,6 @@ _supported_os Linux
_require_scratch _require_scratch
_require_loop _require_loop
MKFS_OPTIONS="" #ignore external MKFS_OPTIONS
_scratch_mkfs_xfs -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null _scratch_mkfs_xfs -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
_scratch_mount 2>/dev/null || _fail "initial scratch mount failed" _scratch_mount 2>/dev/null || _fail "initial scratch mount failed"