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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
_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`
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
_filter()
{
- sed -e "s#$TEST_DIR#TEST_DIR#g" \
- -e '/----------/d'
+ _filter_test_dir | sed -e '/----------/d'
}
# link correct .out file
# 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}'
}
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"