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 _begin_fstest dump ioctl auto quick
12 status=0 # success is the default!
14 # Override the default cleanup function.
23 # Add a new file and append a subset of the fill'ed files
24 # So we can see if just these get dumped on an incremental
26 _add_and_append_dumpdir_fill()
29 echo 'New file' >> newfile
33 # Quota files are stored as special files in the dumpdir of the incremental
34 # backup. This throws off the directory/file count reported because xfsrestore
35 # includes the dumpdir in the restore summary counts.
36 filter_cumulative_quota_updates() {
37 $here/src/feature -U $SCRATCH_DEV && quota=1
38 $here/src/feature -G $SCRATCH_DEV && quota=1
39 $here/src/feature -P $SCRATCH_DEV && quota=1
41 $AWK_PROG -v quota=$quota '
43 if (quota) {$2--; $5--;}
48 # Import common functions.
51 # real QA test starts here
54 $XFSDUMP_PROG -h 2>&1 | grep -q -e -D
56 _notrun "requires xfsdump -D"
60 # ensure file/dir timestamps precede dump timestamp
62 _do_dump_file -f $tmp.df.0
63 _add_and_append_dumpdir_fill
64 _do_dump_file -f $tmp.df.1 -l 1 -D
66 _do_restore_file_cum -f $tmp.df.0
67 _do_restore_file_cum -f $tmp.df.1 | filter_cumulative_quota_updates