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