_filter()
{
- sed -e "s/-b $pgsize/-b PGSIZE/g"
+ sed -e "s/-b $pgsize/-b PGSIZE/g" \
+ -e "s/-l .* -c/-l FSIZE -c/g"
}
# get standard environment, filters and checks
rm -f $here/$seq.out.full
-_do_test 1 50 "-l 50000000 -c 50 -b $pgsize"
-_do_test 2 100 "-l 100000000 -c 100 -b $pgsize"
-_do_test 3 100 "-l 100000000 -c 100 -b 512" # test partial pages
+# Note on special numbers here.
+#
+# We are trying to create roughly 50 or 100 holes in a file
+# using random writes. Assuming a good distribution of 50 writes
+# in a file, the file only needs to be 3-4x the size of the write
+# size muliplied by the number of writes. Hence we use 200 * pgsize
+# for files we want 50 holes in and 400 * pgsize for files we want
+# 100 holes in. This keeps the runtime down as low as possible.
+#
+_do_test 1 50 "-l `expr 200 \* $pgsize` -c 50 -b $pgsize"
+_do_test 2 100 "-l `expr 400 \* $pgsize` -c 100 -b $pgsize"
+_do_test 3 100 "-l `expr 400 \* $pgsize` -c 100 -b 512" # test partial pages
# rinse, lather, repeat for direct IO
-_do_test 4 50 "-d -l 50000000 -c 50 -b $pgsize"
-_do_test 5 100 "-d -l 100000000 -c 100 -b $pgsize"
+_do_test 4 50 "-d -l `expr 200 \* $pgsize` -c 50 -b $pgsize"
+_do_test 5 100 "-d -l `expr 400 \* $pgsize` -c 100 -b $pgsize"
# note: direct IO requires page aligned IO
# todo: realtime.
QA output created by 008
-randholes.1 : -l 50000000 -c 50 -b PGSIZE
+randholes.1 : -l FSIZE -c 50 -b PGSIZE
------------------------------------------
holes is in range
-randholes.2 : -l 100000000 -c 100 -b PGSIZE
+randholes.2 : -l FSIZE -c 100 -b PGSIZE
------------------------------------------
holes is in range
-randholes.3 : -l 100000000 -c 100 -b 512
+randholes.3 : -l FSIZE -c 100 -b 512
------------------------------------------
holes is in range
-randholes.4 : -d -l 50000000 -c 50 -b PGSIZE
+randholes.4 : -d -l FSIZE -c 50 -b PGSIZE
------------------------------------------
holes is in range
-randholes.5 : -d -l 100000000 -c 100 -b PGSIZE
+randholes.5 : -d -l FSIZE -c 100 -b PGSIZE
------------------------------------------
holes is in range