2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2014 Eric Sandeen. All Rights Reserved.
7 # Test out a level 0 dump/restore of a subdir to a file
9 # Use fsstress to create a larger directory structure with a mix of files
10 # Test for regression caused by
11 # c7cb51d xfs: fix error handling at xfs_inumbers
15 seqres=$RESULT_DIR/$seq
16 echo "QA output created by $seq"
20 status=0 # success is the default!
21 trap "_cleanup; exit \$status" 0 1 2 3 15
33 # remove previous $seqres.full before test
36 # real QA test starts here
39 _create_dumpdir_stress_num 4096
41 echo -n "Before: " >> $seqres.full
42 _count_dumpdir_files | tee $tmp.before >> $seqres.full
44 # filter out the file count, it changes as fsstress adds new operations
45 _do_dump_restore | sed -e "/entries processed$/s/[0-9][0-9]*/NUM/g"
47 echo -n "After: " >> $seqres.full
48 _count_restoredir_files | tee $tmp.after >> $seqres.full
49 diff -u $tmp.before $tmp.after