2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2014 Fujitsu. All Rights Reserved.
7 # Test "dump | restore"(as opposed to a tape)
10 _begin_fstest auto dump
12 # Override the default cleanup function.
17 # remove the generated data, which is much and meaningless.
21 # Import common functions.
24 dump_dir=$SCRATCH_MNT/dump_restore_dir
25 restore_dir=$TEST_DIR/dump_restore_dir
29 echo "Run fsstress" >> $seqres.full
30 args=`_scale_fsstress_args -z -f creat=5 -f write=20 -f mkdir=5 -n 100 -p 15 -d $dump_dir`
31 echo "fsstress $args" >> $seqres.full
33 $FSSTRESS_PROG $args >> $seqres.full 2>&1
35 echo "start Dump/Restore" >> $seqres.full
38 $DUMP_PROG -0 -f - $dump_dir 2>/dev/null | $RESTORE_PROG -urvf - >> $seqres.full 2>&1
40 _fail "Dump/Restore failed"
43 rm -rf restoresymtable
46 # real QA test starts here
52 _require_command "$DUMP_PROG" dump
53 _require_command "$RESTORE_PROG" restore
55 echo "Silence is golden"
57 _scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1
59 rm -rf $restore_dir $TEST_DIR/restoresymtable
62 diff -r $dump_dir $restore_dir