2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 SGI. All Rights Reserved.
7 # Dump and restore partialmax + 1 wholly-sparse files
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
24 # get standard environment, filters and checks
29 # real QA test starts here
31 # Modify as appropriate.
38 echo "Silence is golden."
40 mkdir $dump_dir >> $seqres.full 2>&1 || _fail "mkdir \"$dump_dir\" failed"
41 for i in `seq 1 4`; do
42 $XFS_IO_PROG -f -c "truncate 1t" $dump_dir/sparsefile$i \
43 >> $seqres.full 2>&1 || _fail "failed to create sparsefile\"$i\""
45 # Dump and restore the files
47 $XFSDUMP_PROG -L session -M label1 -M label2 -f $tmp.stream1 \
48 -f $tmp.stream2 $SCRATCH_MNT -s $dump_sdir \
49 >> $seqres.full 2>&1 || _fail "dump failed"
50 $XFSRESTORE_PROG -F -f $tmp.stream1 -f $tmp.stream2 $restore_dir \
51 >> $seqres.full 2>&1 || _fail "restore failed"