mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
fix pagesizes used for direct IO randholes run, add missing filter.
This commit is contained in:
@@ -45,6 +45,7 @@ echo "QA output created by $seq"
|
|||||||
here=`pwd`
|
here=`pwd`
|
||||||
tmp=/tmp/$$
|
tmp=/tmp/$$
|
||||||
status=0 # success is the default!
|
status=0 # success is the default!
|
||||||
|
pgsize=`$here/src/getpagesize`
|
||||||
trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15
|
trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15
|
||||||
|
|
||||||
_cleanup()
|
_cleanup()
|
||||||
@@ -52,6 +53,11 @@ _cleanup()
|
|||||||
rm -rf $TEST_DIR/randholes.$$.*
|
rm -rf $TEST_DIR/randholes.$$.*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_filter()
|
||||||
|
{
|
||||||
|
sed -e "s/-b $pgsize/-b PGSIZE/g"
|
||||||
|
}
|
||||||
|
|
||||||
# get standard environment, filters and checks
|
# get standard environment, filters and checks
|
||||||
. ./common.rc
|
. ./common.rc
|
||||||
. ./common.filter
|
. ./common.filter
|
||||||
@@ -66,7 +72,7 @@ _do_test()
|
|||||||
echo ""
|
echo ""
|
||||||
echo "randholes.$_n : $_param"
|
echo "randholes.$_n : $_param"
|
||||||
echo "------------------------------------------"
|
echo "------------------------------------------"
|
||||||
if $here/src/randholes $_param $out >$tmp.out
|
if $here/src/randholes $_param $out | _filter >$tmp.out
|
||||||
then
|
then
|
||||||
# quick check - how many holes did we get?
|
# quick check - how many holes did we get?
|
||||||
count=`xfs_bmap $out | egrep -c ': hole'`
|
count=`xfs_bmap $out | egrep -c ': hole'`
|
||||||
@@ -90,16 +96,14 @@ _do_test()
|
|||||||
|
|
||||||
rm -f $here/$seq.out.full
|
rm -f $here/$seq.out.full
|
||||||
|
|
||||||
pgsize=`$here/src/getpagesize`
|
|
||||||
|
|
||||||
_do_test 1 50 "-l 5000000 -c 50 -b $pgsize"
|
_do_test 1 50 "-l 5000000 -c 50 -b $pgsize"
|
||||||
_do_test 2 100 "-l 10000000 -c 100 -b $pgsize"
|
_do_test 2 100 "-l 10000000 -c 100 -b $pgsize"
|
||||||
_do_test 3 100 "-l 10000000 -c 100 -b 512" # test partial pages
|
_do_test 3 100 "-l 10000000 -c 100 -b 512" # test partial pages
|
||||||
|
|
||||||
# rinse, lather, repeat for direct IO
|
# rinse, lather, repeat for direct IO
|
||||||
_do_test 1 50 "-d -l 5000000 -c 50 -b $pgsize"
|
_do_test 4 50 "-d -l 5000000 -c 50 -b $pgsize"
|
||||||
_do_test 2 100 "-d -l 10000000 -c 100 -b $pgsize"
|
_do_test 5 100 "-d -l 10000000 -c 100 -b $pgsize"
|
||||||
_do_test 3 100 "-d -l 10000000 -c 100 -b 512" # test partial pages
|
# note: direct IO requires page aligned IO
|
||||||
|
|
||||||
# todo: realtime.
|
# todo: realtime.
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,3 @@ holes is in range
|
|||||||
randholes.5 : -d -l 10000000 -c 100 -b PGSIZE
|
randholes.5 : -d -l 10000000 -c 100 -b PGSIZE
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
holes is in range
|
holes is in range
|
||||||
|
|
||||||
randholes.6 : -d -l 10000000 -c 100 -b 512
|
|
||||||
------------------------------------------
|
|
||||||
holes is in range
|
|
||||||
|
|||||||
Reference in New Issue
Block a user