projects
/
xfstests-dev.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Whoops, use a fixed 4k for alloc's "bsize" parameter, seems
[xfstests-dev.git]
/
009
diff --git
a/009
b/009
index f4aacbc0485a97f0a47615c771ac576e3aefe477..d133f2c8719b3c9bf0f1a596ef0bf85f6c0fe07f 100755
(executable)
--- a/
009
+++ b/
009
@@
-5,7
+5,7
@@
# alloc test
#
#-----------------------------------------------------------------------
# alloc test
#
#-----------------------------------------------------------------------
-# Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+# Copyright (c) 2000
-2002
Silicon Graphics, Inc. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as
@@
-46,6
+46,9
@@
here=`pwd`
tmp=/tmp/$$
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
tmp=/tmp/$$
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
+# This isn't really related to fs block size, it's just what
+# alloc uses for the "block" unit in it's input parameters...
+bsize=4096
_cleanup()
{
_cleanup()
{
@@
-55,13
+58,15
@@
_cleanup()
_block_filter()
{
_block_filter()
{
- sed -e 's/[0-9][0-9]*\.\.[0-9][0-9]*/BLOCKRANGE/g'
+ sed \
+ -e 's/[0-9][0-9]*\.\.[0-9][0-9]*/BLOCKRANGE/g' \
+ -e "s/blocksize $bsize/blocksize BSIZE/g"
}
_init()
{
echo "*** mkfs"
}
_init()
{
echo "*** mkfs"
- if ! mkfs_xfs
-f
$SCRATCH_DEV >$tmp.out 2>&1
+ if ! mkfs_xfs $SCRATCH_DEV >$tmp.out 2>&1
then
cat $tmp.out
echo "failed to mkfs $SCRATCH_DEV"
then
cat $tmp.out
echo "failed to mkfs $SCRATCH_DEV"
@@
-102,20
+107,20
@@
out=$SCRATCH_MNT/$$.tmp
echo "*** test 1 - reservations cleared on O_TRUNC"
rm -f $out
echo "*** test 1 - reservations cleared on O_TRUNC"
rm -f $out
-cat <<EOF | src/alloc -n -b
4096
-f $out | _block_filter
+cat <<EOF | src/alloc -n -b
$bsize
-f $out | _block_filter
r 0 1000b
m
EOF
_filesize $out
r 0 1000b
m
EOF
_filesize $out
-cat <<EOF | src/alloc -n -b
4096
-f $out -t | _block_filter
+cat <<EOF | src/alloc -n -b
$bsize
-f $out -t | _block_filter
m
EOF
_filesize $out
echo "*** test 2 - reserve & filesize"
rm -f $out
m
EOF
_filesize $out
echo "*** test 2 - reserve & filesize"
rm -f $out
-cat <<EOF | src/alloc -n -b
4096
-f $out | _block_filter
+cat <<EOF | src/alloc -n -b
$bsize
-f $out | _block_filter
r 0 1000b
EOF
r 0 1000b
EOF
@@
-123,7
+128,7
@@
_filesize $out
echo "*** test 3 - alloc & filesize"
rm -f $out
echo "*** test 3 - alloc & filesize"
rm -f $out
-cat <<EOF | src/alloc -n -b
4096
-f $out | _block_filter
+cat <<EOF | src/alloc -n -b
$bsize
-f $out | _block_filter
a 1000b
EOF
a 1000b
EOF
@@
-131,19
+136,19
@@
_filesize $out
echo "*** test 4 - allocations cleared on O_TRUNC"
rm -f $out
echo "*** test 4 - allocations cleared on O_TRUNC"
rm -f $out
-cat <<EOF | src/alloc -n -b
4096
-f $out | _block_filter
+cat <<EOF | src/alloc -n -b
$bsize
-f $out | _block_filter
a 1000b
EOF
_filesize $out
a 1000b
EOF
_filesize $out
-cat <<EOF | src/alloc -n -b
4096
-f $out -t | _block_filter
+cat <<EOF | src/alloc -n -b
$bsize
-f $out -t | _block_filter
m
EOF
_filesize $out
echo "*** test 5 - reserve / unreserve"
rm -f $out
m
EOF
_filesize $out
echo "*** test 5 - reserve / unreserve"
rm -f $out
-cat <<EOF | src/alloc -n -b
4096
-f $out | _block_filter
+cat <<EOF | src/alloc -n -b
$bsize
-f $out | _block_filter
r 0 100b
u 100b 500b
m
r 0 100b
u 100b 500b
m
@@
-153,7
+158,7
@@
EOF
echo "*** test 6 - reserve adjacent"
rm -f $out
echo "*** test 6 - reserve adjacent"
rm -f $out
-cat <<EOF | src/alloc -t -n -b
4096
-f $out | _block_filter
+cat <<EOF | src/alloc -t -n -b
$bsize
-f $out | _block_filter
r 0 100b
r 100b 100b
m
r 0 100b
r 100b 100b
m
@@
-161,7
+166,7
@@
EOF
echo "*** test 7 - alloc"
rm -f $out
echo "*** test 7 - alloc"
rm -f $out
-cat <<EOF | src/alloc -n -b
4096
-f $out | _block_filter
+cat <<EOF | src/alloc -n -b
$bsize
-f $out | _block_filter
a 1000b
m
a 2000b
a 1000b
m
a 2000b
@@
-172,7
+177,7
@@
_filesize $out
echo "*** test 8 - alloc & truncate"
rm -f $out
echo "*** test 8 - alloc & truncate"
rm -f $out
-cat <<EOF | src/alloc -n -b
4096
-f $out | _block_filter
+cat <<EOF | src/alloc -n -b
$bsize
-f $out | _block_filter
a 1000b
m
t 500b
a 1000b
m
t 500b
@@
-183,7
+188,7
@@
_filesize $out
echo "*** test 9 - reserve & truncate"
rm -f $out
echo "*** test 9 - reserve & truncate"
rm -f $out
-cat <<EOF | src/alloc -n -b
4096
-f $out | _block_filter
+cat <<EOF | src/alloc -n -b
$bsize
-f $out | _block_filter
r 0 1000b
m
t 500b
r 0 1000b
m
t 500b