xfstests: allow dump file name to be passed as arg

xfsdump tests using tapes (rather than files) can pass the tape pathname
to the dump/restore helper functions using the -f option. Change
_parse_args() so that this can be done for file-based tests as well, so
that they don't have to set the global 'dump_file' variable before doing
the dump or restore.

Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Bill Kendall
2011-11-01 14:53:06 -05:00
committed by Christoph Hellwig
parent 7768bf69fe
commit e74bcb4240
5 changed files with 15 additions and 23 deletions
+3 -6
View File
@@ -158,8 +158,7 @@ while [ $i -le $num_dumps ]; do
echo "Listing of what files we have at level $i:"
_list_dir $dump_dir | tee $tmp.ls.$i
dump_file=$tmp.df.level$i
_do_dump_file -l $i
_do_dump_file -f $tmp.df.level$i -l $i
let i=$i+1
done
@@ -168,8 +167,7 @@ i=0
while [ $i -le $num_dumps ]; do
echo ""
echo "restoring from df.level$i"
dump_file=$tmp.df.level$i
_do_restore_toc
_do_restore_toc -f $tmp.df.level$i
let i=$i+1
done
@@ -177,10 +175,9 @@ echo "Do the cumulative restores"
_prepare_restore_dir
i=0
while [ $i -le $num_dumps ]; do
dump_file=$tmp.df.level$i
echo ""
echo "restoring from df.level$i"
_do_restore_file_cum
_do_restore_file_cum -f $tmp.df.level$i
echo "list restore_dir"
_list_dir $restore_dir | _check_quota_file | tee $tmp.restorals.$i
let i=$i+1