5b198ddea2fd3b203fb867f642a7570329aa31ac
[xfstests-dev.git] / tests / xfs / 043
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 043
6 #
7 # Test out xfsdump/restore but rmv inventory prior to restore.
8 # This checks that the on-disk inventory can be successfully
9 # rebuilt from the on-tape inventory.
10 #
11 seqfull=$0
12 . ./common/preamble
13 _begin_fstest dump ioctl tape
14
15 # Override the default cleanup function.
16 _cleanup()
17 {
18         _cleanup_dump
19         cd /
20         rm -f $tmp.*
21 }
22
23 # Import common functions.
24 . ./common/dump
25
26 # real QA test starts here
27 _supported_fs xfs
28
29 _require_tape $TAPE_DEV 
30 _create_dumpdir_fill
31 _erase_hard
32 _do_dump_sub
33 rm -rf /var/{,lib/}xfsdump/inventory # delete it - let cleanup fix it
34 _do_restore
35 _diff_compare_sub
36 _ls_compare_sub
37
38 # success, all done
39 status=0
40 exit