Files
apfstests/018
T

92 lines
1.8 KiB
Bash
Raw Normal View History

#! /bin/sh
2004-06-15 07:32:36 +00:00
# FS QA Test No. 018
#
2003-10-06 07:46:19 +00:00
# xfs_logprint test - test v2 logs of different LR sizes
#
#-----------------------------------------------------------------------
2002-06-04 23:07:56 +00:00
# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
#-----------------------------------------------------------------------
#
# creator
2003-10-06 07:46:19 +00:00
owner=tes@sgi.com
seq=`basename $0`
echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
2003-09-30 07:31:35 +00:00
status=1 # failure is the default!
# get standard environment, filters and checks
. ./common.rc
. ./common.filter
2003-10-06 07:46:19 +00:00
. ./common.log
_cleanup()
{
2004-06-15 07:32:36 +00:00
cd /
2003-10-06 07:46:19 +00:00
_cleanup_logfiles
rm -f $tmp.*
umount $SCRATCH_MNT 2>/dev/null
}
trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
2004-06-15 07:32:36 +00:00
_supported_fs xfs
_supported_os IRIX Linux
2003-09-30 06:31:43 +00:00
# prelim
2003-09-30 07:31:35 +00:00
rm -f $seq.full $tmp.*
_require_scratch
_require_v2log
2004-06-15 07:32:36 +00:00
# link correct .out file
_link_out_file $seq.op
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
2003-09-30 06:31:43 +00:00
cat >$tmp.seq.params <<EOF
2003-10-06 07:46:19 +00:00
# mkfs-opt mount-opt
version=1 logbsize=32k
version=2 logbsize=32k
version=2 logbsize=64k
version=2 logbsize=128k
version=2 logbsize=256k
2003-09-30 06:31:43 +00:00
EOF
if [ "$HOSTOS" = "IRIX" ]; then
start_blk=0
else
start_blk=2
fi
2003-09-30 06:31:43 +00:00
# do the work for various log params which
# should not effect the data content of the log
cat $tmp.seq.params \
| while read mkfs mnt
2003-09-30 06:31:43 +00:00
do
if [ "$mkfs" = "#" ]; then
continue
2003-09-30 06:31:43 +00:00
fi
export MKFS_OPTIONS="-l $mkfs"
export MOUNT_OPTIONS="-o noalign,$mnt"
_mkfs_log
_create_log
_check_log
_print_operation
_cmp_op_output $seq.op $filtered
_print_transaction_inode $start_blk
_cmp_output $seq.trans_inode $filtered
_print_transaction_buf $start_blk
_cmp_output $seq.trans_buf $filtered
2003-09-30 06:31:43 +00:00
done
2003-09-30 07:31:35 +00:00
# got thru it all so we may have success
status=0
2003-09-30 07:31:35 +00:00
exit