* [PATCH] xfstests: use a common _filter_test_dir function
@ 2010-10-22 14:09 Alex Elder
2010-10-25 13:45 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Alex Elder @ 2010-10-22 14:09 UTC (permalink / raw)
To: xfs
Christoph Hellwig suggested that a function similar to the common
"_filter_scratch" function ought to be created to handle filtering
of the TEST_DIR and TEST_DEV variables. This patch implements that.
The name "_filter_test" seems like it might suggest it does
something different, so I'm calling this one "_filter_test_dir".
This unfortunately makes the "test" and "scratch" functions have
different naming conventions, but I guess we should be accustomed
to that by now (consider "TEST_DIR" and "SCRATCH_MNT").
Signed-off-by: Alex Elder <aelder@sgi.com>
---
084 | 3 +--
084.out | 4 ++--
088 | 3 +--
203 | 2 +-
common.filter | 5 +++++
5 files changed, 10 insertions(+), 7 deletions(-)
Index: b/084
===================================================================
--- a/084
+++ b/084
@@ -39,8 +39,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2
_filter_resv()
{
- sed -e "s,$TEST_DIR/resv,[TESTFILE],g" \
- -e 's/[0-9][0-9]* bytes/NUM bytes/g'
+ _filter_test_dir | sed -e 's/[0-9][0-9]* bytes/NUM bytes/g'
}
pgsize=`$here/src/feature -s`
Index: b/084.out
===================================================================
--- a/084.out
+++ b/084.out
@@ -1,9 +1,9 @@
QA output created by 084
*** First case - I/O blocksize same as pagesize
-reserved NUM bytes for [TESTFILE] using XFS_IOC_RESVSP64
+reserved NUM bytes for TEST_DIR/resv using XFS_IOC_RESVSP64
done
*** Second case - 512 byte I/O blocksize
-reserved NUM bytes for [TESTFILE] using XFS_IOC_RESVSP64
+reserved NUM bytes for TEST_DIR/resv using XFS_IOC_RESVSP64
done
Index: b/088
===================================================================
--- a/088
+++ b/088
@@ -39,8 +39,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2
_filter()
{
- sed -e "s#$TEST_DIR#TEST_DIR#g" \
- -e '/----------/d'
+ _filter_test_dir | sed -e '/----------/d'
}
# link correct .out file
Index: b/203
===================================================================
--- a/203
+++ b/203
@@ -48,7 +48,7 @@ _write_holes()
# 1: [8..2047]: hole
_filter_bmap()
{
- sed "s#$TEST_DIR#TEST_DIR#g" | \
+ _filter_test_dir |
awk '$3 ~ /hole/ { print $1, $2, $3; next }
{print $1, $2; next}'
}
Index: b/common.filter
===================================================================
--- a/common.filter
+++ b/common.filter
@@ -214,6 +214,11 @@ _filter_xfs_io_unique()
common_line_filter | _filter_xfs_io
}
+_filter_test_dir()
+{
+ sed -e "s,$TEST_DEV,TEST_DEV,g" -e "s,$TEST_DIR,TEST_DIR,g"
+}
+
_filter_scratch()
{
sed -e "s,$SCRATCH_DEV,SCRATCH_DEV,g" -e "s,$SCRATCH_MNT,SCRATCH_MNT,g"
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] xfstests: use a common _filter_test_dir function
2010-10-22 14:09 [PATCH] xfstests: use a common _filter_test_dir function Alex Elder
@ 2010-10-25 13:45 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2010-10-25 13:45 UTC (permalink / raw)
To: Alex Elder; +Cc: xfs
On Fri, Oct 22, 2010 at 09:09:24AM -0500, Alex Elder wrote:
> Christoph Hellwig suggested that a function similar to the common
> "_filter_scratch" function ought to be created to handle filtering
> of the TEST_DIR and TEST_DEV variables. This patch implements that.
>
> The name "_filter_test" seems like it might suggest it does
> something different, so I'm calling this one "_filter_test_dir".
> This unfortunately makes the "test" and "scratch" functions have
> different naming conventions, but I guess we should be accustomed
> to that by now (consider "TEST_DIR" and "SCRATCH_MNT").
>
> Signed-off-by: Alex Elder <aelder@sgi.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-25 13:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-22 14:09 [PATCH] xfstests: use a common _filter_test_dir function Alex Elder
2010-10-25 13:45 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox