allow mkfs arguments to be passed from the env for testing multiple

block sizes.
This commit is contained in:
Nathan Scott
2002-01-20 00:47:43 +00:00
parent a7d6e4ed5c
commit 36d5db422b
30 changed files with 56 additions and 33 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ trap "_cleanup" 0 1 2 3 15
_populate_scratch() _populate_scratch()
{ {
mkfs -t xfs -f $SCRATCH_DEV >/dev/null 2>&1 mkfs_xfs -f $SCRATCH_DEV >/dev/null 2>&1
mount -t xfs $SCRATCH_DEV $SCRATCH_MNT mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
dd if=/dev/zero of=$SCRATCH_MNT/foo count=200 bs=4096 >/dev/null 2>&1 & dd if=/dev/zero of=$SCRATCH_MNT/foo count=200 bs=4096 >/dev/null 2>&1 &
dd if=/dev/zero of=$SCRATCH_MNT/goo count=400 bs=4096 >/dev/null 2>&1 & dd if=/dev/zero of=$SCRATCH_MNT/goo count=400 bs=4096 >/dev/null 2>&1 &
+1 -1
View File
@@ -61,7 +61,7 @@ _block_filter()
_init() _init()
{ {
echo "*** mkfs" echo "*** mkfs"
if ! mkfs -t xfs -f $SCRATCH_DEV >$tmp.out 2>&1 if ! mkfs_xfs -f $SCRATCH_DEV >$tmp.out 2>&1
then then
cat $tmp.out cat $tmp.out
echo "failed to mkfs $SCRATCH_DEV" echo "failed to mkfs $SCRATCH_DEV"
+1 -1
View File
@@ -76,7 +76,7 @@ _filter_dd()
# real QA test starts here # real QA test starts here
_require_scratch _require_scratch
mkfs -t xfs -f -d size=50m $SCRATCH_DEV >/dev/null mkfs_xfs -f -d size=50m $SCRATCH_DEV >/dev/null
mount -t xfs $SCRATCH_DEV $SCRATCH_MNT mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
out=$SCRATCH_MNT/fillup.$$ out=$SCRATCH_MNT/fillup.$$
rm -f $seq.full rm -f $seq.full
+1 -1
View File
@@ -77,7 +77,7 @@ _init()
echo "*** reset partition" echo "*** reset partition"
$here/src/devzero -b 2048 -n 50 -v 198 $SCRATCH_DEV $here/src/devzero -b 2048 -n 50 -v 198 $SCRATCH_DEV
echo "*** mkfs" echo "*** mkfs"
if ! mkfs -t xfs -f -d size=50m -l size=512b $SCRATCH_DEV >$tmp.out 2>&1 if ! mkfs_xfs -f -d size=50m -l size=512b $SCRATCH_DEV >$tmp.out 2>&1
then then
cat $tmp.out cat $tmp.out
echo "failed to mkfs $SCRATCH_DEV" echo "failed to mkfs $SCRATCH_DEV"
+1 -1
View File
@@ -98,7 +98,7 @@ rm -f $seq.full
umount $SCRATCH_DEV >/dev/null 2>&1 umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** MKFS ***" >>$seq.full echo "*** MKFS ***" >>$seq.full
echo "" >>$seq.full echo "" >>$seq.full
mkfs -t xfs -f $SCRATCH_DEV >>$seq.full 2>&1 \ mkfs_xfs -f $SCRATCH_DEV >>$seq.full 2>&1 \
|| _fail "mkfs failed" || _fail "mkfs failed"
mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seq.full 2>&1 \ mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seq.full 2>&1 \
|| _fail "mount failed" || _fail "mount failed"
+1 -1
View File
@@ -122,7 +122,7 @@ rm -f $seq.out $seq.full
umount $SCRATCH_DEV >/dev/null 2>&1 umount $SCRATCH_DEV >/dev/null 2>&1
_full "mkfs" _full "mkfs"
mkfs -t xfs -f -lsize=2000b $SCRATCH_DEV >>$seq.full 2>&1 \ mkfs_xfs -f -lsize=2000b $SCRATCH_DEV >>$seq.full 2>&1 \
|| _fail "mkfs failed" || _fail "mkfs failed"
_full " mount" _full " mount"
mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seq.full 2>&1 \ mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seq.full 2>&1 \
+1 -1
View File
@@ -127,7 +127,7 @@ _verify_fs()
umount $SCRATCH_DEV >/dev/null 2>&1 umount $SCRATCH_DEV >/dev/null 2>&1
_full "mkfs" _full "mkfs"
mkfs -t xfs -f $VERSION -p $protofile $SCRATCH_DEV >>$seqfull 2>&1 \ mkfs_xfs -f $VERSION -p $protofile $SCRATCH_DEV >>$seqfull 2>&1 \
|| _fail "mkfs failed" || _fail "mkfs failed"
echo "*** check FS" echo "*** check FS"
+1 -1
View File
@@ -81,7 +81,7 @@ echo "*** mkfs"
rm -f $seq.full rm -f $seq.full
umount $SCRATCH_DEV >/dev/null 2>&1 umount $SCRATCH_DEV >/dev/null 2>&1
mkfs -t xfs -f $SCRATCH_DEV >/dev/null \ mkfs_xfs -f $SCRATCH_DEV >/dev/null \
|| _fail "mkfs failed" || _fail "mkfs failed"
echo "*** mount FS" echo "*** mount FS"
+1 -1
View File
@@ -76,7 +76,7 @@ _filter_logprint()
_require_scratch _require_scratch
echo echo
mkfs -t xfs -f $mkfs_args $SCRATCH_DEV | _filter_mkfs 2>/dev/null mkfs_xfs -f $mkfs_args $SCRATCH_DEV | _filter_mkfs 2>/dev/null
echo echo
xfs_logprint $logp_args $SCRATCH_DEV | _filter_logprint xfs_logprint $logp_args $SCRATCH_DEV | _filter_logprint
+2 -2
View File
@@ -78,7 +78,7 @@ _require_scratch
# superblock (hanging around from earlier tests)... # superblock (hanging around from earlier tests)...
# #
size="-d size=100m" size="-d size=100m"
mkfs -t xfs -f $size $SCRATCH_DEV >/dev/null 2>&1 mkfs_xfs -f $size $SCRATCH_DEV >/dev/null 2>&1
if [ $? -ne 0 ] # probably don't have a big enough scratch if [ $? -ne 0 ] # probably don't have a big enough scratch
then then
_notrun "SCRATCH_DEV too small, results would be non-deterministic" _notrun "SCRATCH_DEV too small, results would be non-deterministic"
@@ -100,7 +100,7 @@ src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
# now kick off the real repair test... # now kick off the real repair test...
# #
mkfs -t xfs -f $size $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs mkfs_xfs -f $size $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
source $tmp.mkfs source $tmp.mkfs
_check_ag 0 _check_ag 0
_check_ag -1 _check_ag -1
+3 -3
View File
@@ -98,13 +98,13 @@ EOF
# #
_require_scratch _require_scratch
MKFSV1="-t xfs -f -p $tmp.proto -n version=1 $SCRATCH_DEV" MKFSV1="-f -p $tmp.proto -n version=1 $SCRATCH_DEV"
MKFSV2="-t xfs -f -p $tmp.proto -n version=2 $SCRATCH_DEV" MKFSV2="-f -p $tmp.proto -n version=2 $SCRATCH_DEV"
# sanity test - default + one root directory entry # sanity test - default + one root directory entry
_create_proto 0 _create_proto 0
echo "=== version 1, one entry" echo "=== version 1, one entry"
mkfs $MKFSV1 | _filter_mkfs >/dev/null 2>&1 mkfs_xfs $MKFSV1 | _filter_mkfs >/dev/null 2>&1
_check_repair _check_repair
echo "=== version 2, one entry (shortform)" echo "=== version 2, one entry (shortform)"
mkfs $MKFSV2 | _filter_mkfs >/dev/null 2>&1 mkfs $MKFSV2 | _filter_mkfs >/dev/null 2>&1
+1 -1
View File
@@ -79,7 +79,7 @@ do
# next, ensure we don't overwrite it # next, ensure we don't overwrite it
echo "=== Attempting XFS overwrite of $fs..." >>$seq.full echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
mkfs -t xfs $SCRATCH_DEV >>$seq.full 2>&1 mkfs_xfs $SCRATCH_DEV >>$seq.full 2>&1
[ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!" [ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
done done
+1 -1
View File
@@ -75,7 +75,7 @@ _check_root_inos()
_require_scratch _require_scratch
# devzero blows away 512byte blocks, so make 512byte inodes # devzero blows away 512byte blocks, so make 512byte inodes
mkfs -t xfs -f -i size=512 $SCRATCH_DEV | _filter_mkfs 2>/dev/null mkfs_xfs -f -i size=512 $SCRATCH_DEV | _filter_mkfs 2>/dev/null
`xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \ `xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \
sed -e 's/ //g' -e 's/^/export /'` sed -e 's/ //g' -e 's/^/export /'`
+1 -1
View File
@@ -67,7 +67,7 @@ rm -f $seq.full
umount $SCRATCH_DEV >/dev/null 2>&1 umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** MKFS ***" >>$seq.full echo "*** MKFS ***" >>$seq.full
echo "" >>$seq.full echo "" >>$seq.full
mkfs -t xfs -f $SCRATCH_DEV >>$seq.full 2>&1 \ mkfs_xfs -f $SCRATCH_DEV >>$seq.full 2>&1 \
|| _fail "mkfs failed" || _fail "mkfs failed"
mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seq.full 2>&1 \ mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seq.full 2>&1 \
|| _fail "mount failed" || _fail "mount failed"
+1 -1
View File
@@ -75,7 +75,7 @@ rm -f $seq.full
#agsize=16 #agsize=16
agsize=32 agsize=32
echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... " echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... "
_do "mkfs -t xfs -d size=${agsize}m,agcount=1 -l internal -f $SCRATCH_DEV" _do "mkfs_xfs -d size=${agsize}m,agcount=1 -l internal -f $SCRATCH_DEV"
_do "mount -t xfs $SCRATCH_DEV $SCRATCH_MNT" _do "mount -t xfs $SCRATCH_DEV $SCRATCH_MNT"
echo "done" echo "done"
+1 -1
View File
@@ -105,7 +105,7 @@ mnt_cmd="mount -t xfs $SCRATCH_DEV $SCRATCH_MNT"
_do_die_on_error=message_only _do_die_on_error=message_only
echo -n "Make a 48 megabyte filesystem on SCRATCH_DEV and mount... " echo -n "Make a 48 megabyte filesystem on SCRATCH_DEV and mount... "
_do "mkfs -t xfs -d size=48m,agcount=3 -l internal -f $SCRATCH_DEV" _do "mkfs_xfs -d size=48m,agcount=3 -l internal -f $SCRATCH_DEV"
_do "$mnt_cmd" _do "$mnt_cmd"
echo "done" echo "done"
+1 -1
View File
@@ -125,7 +125,7 @@ _require_scratch
echo -e -n "\n\r*** XFS QA 044 - expect mount failure messages\n\r\n\r" >/dev/console echo -e -n "\n\r*** XFS QA 044 - expect mount failure messages\n\r\n\r" >/dev/console
echo "*** mkfs" echo "*** mkfs"
mkfs -t xfs -f -l logdev=$SCRATCH_LOGDEV,size=4096b $SCRATCH_DEV | _filter_mkfs 2>/dev/null mkfs_xfs -f -l logdev=$SCRATCH_LOGDEV,size=4096b $SCRATCH_DEV | _filter_mkfs 2>/dev/null
_check_mount _check_mount
_check_require_logdev _check_require_logdev
+1 -1
View File
@@ -65,7 +65,7 @@ _require_scratch
echo "*** get uuid" echo "*** get uuid"
uuid=`_get_uuid $TEST_DEV` uuid=`_get_uuid $TEST_DEV`
echo "*** mkfs" echo "*** mkfs"
if ! mkfs -t xfs -f $SCRATCH_DEV >$tmp.out 2>&1 if ! mkfs_xfs -f $SCRATCH_DEV >$tmp.out 2>&1
then then
cat $tmp.out cat $tmp.out
echo "!!! failed to mkfs on $SCRATCH_DEV" echo "!!! failed to mkfs on $SCRATCH_DEV"
+1 -1
View File
@@ -92,7 +92,7 @@ mount -t ext2 $SCRATCH_DEV $SCRATCH_MNT >> $seq.full 2>&1 \
|| _fail "!!! failed to mount" || _fail "!!! failed to mount"
_log "Create xfs fs in file on scratch" _log "Create xfs fs in file on scratch"
mkfs -t xfs -d file,name=$SCRATCH_MNT/test.xfs,size=20m >> $seq.full 2>&1 \ mkfs_xfs -d file,name=$SCRATCH_MNT/test.xfs,size=20m >> $seq.full 2>&1 \
|| _fail "!!! failed to mkfs xfs" || _fail "!!! failed to mkfs xfs"
_log "Make mount points" _log "Make mount points"
+1 -1
View File
@@ -74,7 +74,7 @@ if [ -z "$MOUNT_OPTIONS" ]; then
fi fi
# real QA test starts here # real QA test starts here
mkfs -t xfs -f $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs mkfs_xfs -f $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
cat $tmp.mkfs >>$seq.full cat $tmp.mkfs >>$seq.full
# keep the blocksize and data size for dd later # keep the blocksize and data size for dd later

Some files were not shown because too many files have changed in this diff Show More