7413f0b1e704828ddecf07e80b402628f8363108
[xfstests-dev.git] / tests / xfs / 043
1 #! /bin/bash
2 # FS QA Test No. 043
3 #
4 # Test out xfsdump/restore but rmv inventory prior to restore.
5 # This checks that the on-disk inventory can be successfully
6 # rebuilt from the on-tape inventory.
7 #
8 #-----------------------------------------------------------------------
9 # Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
10 #
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License as
13 # published by the Free Software Foundation.
14 #
15 # This program is distributed in the hope that it would be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write the Free Software Foundation,
22 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
23 #
24 #-----------------------------------------------------------------------
25 #
26
27 seqfull=$0
28 seq=`basename $0`
29 seqres=$RESULT_DIR/$seq
30 seqres=$RESULT_DIR/$seq
31 seqres=$RESULT_DIR/$seq
32 echo "QA output created by $seq"
33
34 here=`pwd`
35 tmp=/tmp/$$
36 status=1        # failure is the default!
37 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
38
39 # get standard environment, filters and checks
40 . ./common/rc
41 . ./common/dump
42
43 # link correct .out file
44 _link_out_file $seq.out $seqfull.out
45
46 # real QA test starts here
47 _supported_fs xfs
48 _supported_os IRIX Linux
49
50 _require_tape $TAPE_DEV 
51 _create_dumpdir_fill
52 _erase_hard
53 _do_dump_sub
54 rm -rf /var/{,lib/}xfsdump/inventory # delete it - let cleanup fix it
55 _do_restore
56 _diff_compare_sub
57 _ls_compare_sub
58
59 # success, all done
60 status=0
61 exit