2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2011 SGI. All Rights Reserved.
7 # Test incremental dumps with -D (skip unchanged dirs)
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=0 # success is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
26 # Add a new file and append a subset of the fill'ed files
27 # So we can see if just these get dumped on an incremental
29 _add_and_append_dumpdir_fill()
32 echo 'New file' >> newfile
36 # Quota files are stored as special files in the dumpdir of the incremental
37 # backup. This throws off the directory/file count reported because xfsrestore
38 # includes the dumpdir in the restore summary counts.
39 filter_cumulative_quota_updates() {
40 $here/src/feature -U $SCRATCH_DEV && quota=1
41 $here/src/feature -G $SCRATCH_DEV && quota=1
42 $here/src/feature -P $SCRATCH_DEV && quota=1
44 $AWK_PROG -v quota=$quota '
46 if (quota) {$2--; $5--;}
51 # get standard environment, filters and checks
55 # real QA test starts here
58 $XFSDUMP_PROG -h 2>&1 | grep -q -e -D
60 _notrun "requires xfsdump -D"
64 # ensure file/dir timestamps precede dump timestamp
66 _do_dump_file -f $tmp.df.0
67 _add_and_append_dumpdir_fill
68 _do_dump_file -f $tmp.df.1 -l 1 -D
70 _do_restore_file_cum -f $tmp.df.0
71 _do_restore_file_cum -f $tmp.df.1 | filter_cumulative_quota_updates