aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2017-12-13 15:28:05 -0800
committerEryu Guan <eguan@redhat.com>2018-01-06 02:09:02 +0800
commit4515048910312573d8989ba64ee5cac76138e8f8 (patch)
tree7f0d536094842eeba2b7993ea20ece6a1c86f107
parent70138c383bf5af34484c237e6b85399bccce7e13 (diff)
downloadxfstests-4515048910312573d8989ba64ee5cac76138e8f8.tar.gz
xfs/068: fix clonerange problems in file/dir count output
In this test we use a fixed sequence of operations in fsstress to create some number of files and dirs and then exercise xfsdump/xfsrestore on them. Since clonerange/deduperange are not supported on all xfs configurations, detect if they're in fsstress and disable them so that we always execute exactly the same sequence of operations no matter how the filesystem is configured. [eguan: move it from xfs/068 to common/dump as Dave suggested] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Suggested-by: Dave Chinner <david@fromorbit.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
-rw-r--r--common/dump11
1 files changed, 11 insertions, 0 deletions
diff --git a/common/dump b/common/dump
index 898aaa40b3..2b3cfa0f06 100644
--- a/common/dump
+++ b/common/dump
@@ -312,6 +312,17 @@ _create_dumpdir_stress_num()
status=1
exit
fi
+
+ # Remove fsstress commands that aren't supported on all xfs configs so that
+ # we always execute exactly the same sequence of operations no matter how
+ # the filesystem is configured
+ if $FSSTRESS_PROG | grep -q clonerange; then
+ FSSTRESS_AVOID="-f clonerange=0 $FSSTRESS_AVOID"
+ fi
+ if $FSSTRESS_PROG | grep -q deduperange; then
+ FSSTRESS_AVOID="-f deduperange=0 $FSSTRESS_AVOID"
+ fi
+
echo ""
echo "-----------------------------------------------"
echo "fsstress : $_param"