4 # Test "dump | restore"(as opposed to a tape)
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2014 Fujitsu. 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
22 #-----------------------------------------------------------------------
26 seqres=$RESULT_DIR/$seq
27 echo "QA output created by $seq"
31 status=1 # failure is the default!
32 trap "_cleanup; exit \$status" 0 1 2 3 15
38 # remove the generated data, which is much and meaningless.
42 # get standard environment, filters and checks
46 dump_dir=$SCRATCH_MNT/dump_restore_dir
47 restore_dir=$TEST_DIR/dump_restore_dir
51 echo "Run fsstress" >> $seqres.full
52 args=`_scale_fsstress_args -z -f creat=5 -f write=20 -f mkdir=5 -n 1000 -p 15 -d $dump_dir`
53 echo "fsstress $args" >> $seqres.full
55 $FSSTRESS_PROG $args >> $seqres.full 2>&1
57 echo "start Dump/Restore" >> $seqres.full
60 $DUMP_PROG -0 -f - $dump_dir 2>/dev/null | $RESTORE_PROG -urvf - >> $seqres.full 2>&1
62 _fail "Dump/Restore failed"
65 rm -rf restoresymtable
68 # real QA test starts here
75 _require_command $DUMP_PROG
76 _require_command $RESTORE_PROG
79 echo "Silence is golden"
81 _scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1
83 rm -rf $restore_dir $TEST_DIR/restoresymtable
86 diff -r $dump_dir $restore_dir