4 # Make sure the chattr dump flag gets picked up by xfsdump without a sync
6 # http://oss.sgi.com/bugzilla/show_bug.cgi?id=340
8 #-----------------------------------------------------------------------
9 # Copyright (c) 2008 Christoph Hellwig.
10 #-----------------------------------------------------------------------
16 echo "QA output created by $seq"
20 status=1 # failure is the default!
25 rm -f $TEST_DIR/dumpfile
27 trap "_cleanup; exit \$status" 0 1 2 3 15
30 # Perform a level 0 dump that respects the chattr dump exclude flag,
31 # and grep the output for the inode number we expect / do not expect
34 # Only dump a subtree so we get away with a single partition for
35 # the subtree to be dumped and the dump file.
39 xfsdump -l 0 -s d -F \
41 -f $TEST_DIR/dumpfile -e -v excluded_files=debug $TEST_DIR \
43 | sed -e 's/xfsdump: pruned ino [0-9]*, owner 0, estimated size 0: skip flag set/xfsdump: pruned ino NNN, owner 0, estimated size 0: skip flag set/'
46 # get standard environment, filters and checks
50 # real QA test starts here
56 echo "Preparing subtree"
59 inum=`stat --format "%i" $TEST_DIR/d/t`
61 echo "No dump exclude flag set (should not be skipped)"
64 echo "Dump exclude flag set, but no sync yet (should be skipped)"
65 chattr +d $TEST_DIR/d/t
68 echo "Dump exclude flag set, after sync (should be skipped)"