xfstests 250: remove unwanted new line in 250.out
[xfstests-dev.git] / 282
1 #! /bin/bash
2 # FS QA Test No. 282
3 #
4 # Test incremental dumps containing a mix of dump formats.
5 # level 0 - format 2
6 # level 1 - current format
7 #
8 #-----------------------------------------------------------------------
9 # Copyright (c) 2012 SGI.  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 # creator
27 owner=wkendall@sgi.com
28
29 seq=`basename $0`
30 echo "QA output created by $seq"
31
32 here=`pwd`
33 tmp=/tmp/$$
34 status=1        # failure is the default!
35 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
36
37 # get standard environment, filters and checks
38 . ./common.rc
39 . ./common.dump
40
41 # real QA test starts here
42 _supported_fs xfs
43 _supported_os Linux
44
45 _require_legacy_v2_format
46
47 _create_dumpdir_fill
48 # ensure file/dir timestamps precede dump timestamp
49 sleep 2
50 src/bstat $SCRATCH_MNT >>$here/$seq.full
51
52 echo "*** Level 0 dump, format 2"
53 _do_dump_file -f $tmp.l0 -K
54
55 _append_dumpdir_fill
56 src/bstat $SCRATCH_MNT >>$here/$seq.full
57
58 echo "*** Level 1 dump, current format"
59 _do_dump_file -l 1 -f $tmp.l1
60
61 echo "*** Restore using format 2 level 0"
62 _prepare_restore_dir
63 _do_restore_file_cum -f $tmp.l0
64
65 echo "*** Restore using current format level 1"
66 _do_restore_file_cum -f $tmp.l1
67 _diff_compare
68
69 # success, all done
70 status=0
71 exit