4 # Dump and restore partialmax + 1 wholly-sparse files
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2013 SGI. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation.
13 # This program is distributed in the hope that it would be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #-----------------------------------------------------------------------
25 seqres=$RESULT_DIR/$seq
26 echo "QA output created by $seq"
30 status=1 # failure is the default!
31 trap "_cleanup; exit \$status" 0 1 2 3 15
39 # get standard environment, filters and checks
44 # real QA test starts here
46 # Modify as appropriate.
53 echo "Silence is golden."
55 mkdir $dump_dir >> $seqres.full 2>&1 || _fail "mkdir \"$dump_dir\" failed"
56 for i in `seq 1 4`; do
57 $XFS_IO_PROG -f -c "truncate 1t" $dump_dir/sparsefile$i \
58 >> $seqres.full 2>&1 || _fail "failed to create sparsefile\"$i\""
60 # Dump and restore the files
62 $XFSDUMP_PROG -L session -M label1 -M label2 -f $tmp.stream1 \
63 -f $tmp.stream2 $SCRATCH_MNT -s $dump_sdir \
64 >> $seqres.full 2>&1 || _fail "dump failed"
65 $XFSRESTORE_PROG -F -f $tmp.stream1 -f $tmp.stream2 $restore_dir \
66 >> $seqres.full 2>&1 || _fail "restore failed"