xfs/530: skip test if user MKFS_OPTIONS screw up formatting
[xfstests-dev.git] / tests / xfs / 282
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2012 SGI.  All Rights Reserved.
4 #
5 # FS QA Test No. 282
6 #
7 # Test incremental dumps containing a mix of dump formats.
8 # level 0 - format 2
9 # level 1 - current format
10 #
11 . ./common/preamble
12 _begin_fstest dump ioctl auto quick
13
14 # Override the default cleanup function.
15 _cleanup()
16 {
17         _cleanup_dump
18         cd /
19         rm -f $tmp.*
20 }
21
22 # Import common functions.
23 . ./common/dump
24
25 # real QA test starts here
26 _supported_fs xfs
27
28 _require_legacy_v2_format
29
30 _create_dumpdir_fill
31 # ensure file/dir timestamps precede dump timestamp
32 sleep 2
33 $here/src/bstat $SCRATCH_MNT >>$seqres.full
34
35 echo "*** Level 0 dump, format 2"
36 _do_dump_file -f $tmp.l0 -K
37
38 _append_dumpdir_fill
39 $here/src/bstat $SCRATCH_MNT >>$seqres.full
40
41 echo "*** Level 1 dump, current format"
42 _do_dump_file -l 1 -f $tmp.l1
43
44 echo "*** Restore using format 2 level 0"
45 _prepare_restore_dir
46 _do_restore_file_cum -f $tmp.l0
47
48 echo "*** Restore using current format level 1"
49 _do_restore_file_cum -f $tmp.l1
50 _diff_compare
51
52 # success, all done
53 status=0
54 exit