From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 11/13] xfstests: exclude largefs fill files from dump tests
Date: Fri, 15 Mar 2013 22:53:29 +1100 [thread overview]
Message-ID: <1363348411-21867-12-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1363348411-21867-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
The xfsdump/restore tests will see the space filling files and may
try to backthem up and restore them, consuming huge amounts of time
to do (espcially when diffing the results). Exclude the space
filling files by setting the no dump attributes on them and ensure
that xfsdump runs with the -e flag to exclude such files.
This also needs a dump filter addition to remove the output that
files were skipped, and to decrement the count of files processed by
xfsrestore because the inventory still includes excluded files.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
common.config | 3 ++-
common.dump | 34 ++++++++++++++++++++++++++--------
common.filter | 4 +++-
common.rc | 1 +
4 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/common.config b/common.config
index 5ac58bf..ab19772 100644
--- a/common.config
+++ b/common.config
@@ -160,7 +160,8 @@ export XFS_GROWFS_PROG=`set_prog_path xfs_growfs`
export XFS_IO_PROG="`set_prog_path xfs_io`"
export XFS_PARALLEL_REPAIR_PROG="`set_prog_path xfs_prepair`"
export XFS_PARALLEL_REPAIR64_PROG="`set_prog_path xfs_prepair64`"
-export XFSDUMP_PROG="`set_prog_path xfsdump`"
+export __XFSDUMP_PROG="`set_prog_path xfsdump`"
+export XFSDUMP_PROG="$__XFSDUMP_PROG -e"
export XFSRESTORE_PROG="`set_prog_path xfsrestore`"
export XFSINVUTIL_PROG="`set_prog_path xfsinvutil`"
export DBENCH_PROG="`set_prog_path dbench`"
diff --git a/common.dump b/common.dump
index e89dedc..be55249 100644
--- a/common.dump
+++ b/common.dump
@@ -29,7 +29,8 @@ if [ -n "$DEBUGDUMP" ]; then
# Use dump/restore in qa directory (copy them here) for debugging
export PATH="$here:$PATH"
- export XFSDUMP_PROG="`set_prog_path xfsdump`"
+ export __XFSDUMP_PROG="`set_prog_path xfsdump`"
+ export XFSDUMP_PROG="$__XFSDUMP_PROG -e"
export XFSRESTORE_PROG="`set_prog_path xfsrestore`"
export XFSINVUTIL_PROG="`set_prog_path xfsinvutil`"
[ -x $here/xfsdump ] && echo "Using xfstests' xfsdump for debug"
@@ -829,7 +830,7 @@ _dump_filter_main()
{
_filter_devchar |\
sed \
- -e "s#$XFSDUMP_PROG#xfsdump#" \
+ -e "s#$__XFSDUMP_PROG#xfsdump#" \
-e "s#$XFSRESTORE_PROG#xfsrestore#" \
-e "s#$XFSINVUTIL_PROG#xfsinvutil#" \
-e "s/`hostname`/HOSTNAME/" \
@@ -872,13 +873,29 @@ _dump_filter_main()
-e '/xfsdump: ino map phase [5]/,1d' \
-e 's/id:[[:space:]]*[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/ID: ID/' \
-e 's/\[y\/n\][- ]----------------------*/\[y\/n\]/' \
+ -e '/skip attribute set/d' \
| perl -ne '
- if ($_ =~ /(?:Dump|Restore) Summary/) {
- $skip = 1;
- } elsif ($_ =~ /(?:Dump|Restore) Status/) {
- $skip = 0;
- }
- print if (! $skip);'
+ # filter out all the output between the lines "Dump Summary:"
+ # and "Dump Status:"
+ if ($_ =~ /(?:Dump|Restore) Summary/) {
+ $skip = 1;
+ } elsif ($_ =~ /(?:Dump|Restore) Status/) {
+ $skip = 0;
+ }
+ print if (! $skip);' \
+ | perl -ne '
+ # correct the file count if large scratch devices are being used
+ $skip = 0;
+ if ($_ =~ /(\S+) directories and (\S+) entries/) {
+ $foo = $2;
+ if ($ENV{'LARGE_SCRATCH_DEV'} && $foo > 0) {
+ $foo -= 1;
+ }
+ printf("xfsrestore: %u directories and %u entries processed\n",
+ $1, $foo);
+ $skip = 1;
+ }
+ print if (! $skip);'
}
_dump_filter()
@@ -916,6 +933,7 @@ _dir_filter()
-e "s#$dump_sdir#DUMP_SUBDIR#g" \
-e "s#$restore_sdir#RESTORE_SUBDIR#g" \
-e "s#$$#PID#g" \
+ -e "/Only in SCRATCH_MNT: .use_space/d" \
}
diff --git a/common.filter b/common.filter
index c34809f..da5675f 100644
--- a/common.filter
+++ b/common.filter
@@ -223,7 +223,9 @@ _filter_test_dir()
_filter_scratch()
{
- sed -e "s,$SCRATCH_DEV,SCRATCH_DEV,g" -e "s,$SCRATCH_MNT,SCRATCH_MNT,g"
+ sed -e "s,$SCRATCH_DEV,SCRATCH_DEV,g" \
+ -e "s,$SCRATCH_MNT,SCRATCH_MNT,g" \
+ -e "/.use_space/d"
}
# Turn any device in the scratch pool into SCRATCH_DEV
diff --git a/common.rc b/common.rc
index 690c6a3..96d5077 100644
--- a/common.rc
+++ b/common.rc
@@ -306,6 +306,7 @@ _setup_large_xfs_fs()
xfs_io -F -f \
-c "truncate $file_size" \
-c "falloc -k 0 $file_size" \
+ -c "chattr +d" \
$SCRATCH_MNT/.use_space 2>&1 > /dev/null
status=$?
umount $SCRATCH_MNT
--
1.7.10.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-03-15 11:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 11:53 [PATCH 00/13] xfstests: generic --large-fs support Dave Chinner
2013-03-15 11:53 ` [PATCH 01/13] xfstests: filter new repair/mkfs output for CRCs Dave Chinner
2013-03-19 19:44 ` Rich Johnston
2013-03-19 20:58 ` Ben Myers
2013-03-19 22:52 ` Dave Chinner
2013-03-15 11:53 ` [PATCH 02/13] xfstests: add --largefs check option Dave Chinner
2013-03-15 11:53 ` [PATCH 03/13] xfstests: rename USE_BIG_LOOPFS to be more generic Dave Chinner
2013-03-19 19:46 ` Rich Johnston
2013-03-15 11:53 ` [PATCH 04/13] xfstests: rename RETAIN_AG_BYTES Dave Chinner
2013-03-15 11:53 ` [PATCH 05/13] xfstests: use preallocation for ag-wiper Dave Chinner
2013-03-19 19:47 ` Rich Johnston
2013-03-15 11:53 ` [PATCH 06/13] xfstests: use command line option for setting extra space Dave Chinner
2013-03-15 11:53 ` [PATCH 07/13] xfstest: enable xfs_repair for large filesystem testing Dave Chinner
2013-03-15 11:53 ` [PATCH 08/13] xfstests: always use test option when checking large scratch device Dave Chinner
2013-03-15 11:53 ` [PATCH 09/13] xfstests: enable large fs testing on ext4 Dave Chinner
2013-03-15 11:53 ` [PATCH 10/13] xfstests: disable tests that typically fail on large filesystems Dave Chinner
2013-03-15 11:53 ` Dave Chinner [this message]
2013-03-19 19:49 ` [PATCH 11/13] xfstests: exclude largefs fill files from dump tests Rich Johnston
2013-03-15 11:53 ` [PATCH 12/13] xfstests: filter files in 019 for --large-fs Dave Chinner
2013-03-19 19:52 ` Rich Johnston
2013-03-15 11:53 ` [PATCH 13/13] xfstests: correct quota file count " Dave Chinner
2013-03-19 19:52 ` Rich Johnston
2013-03-19 20:20 ` [PATCH 00/13] xfstests: generic --large-fs support Rich Johnston
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363348411-21867-12-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox