2001-01-15 05:01:19 +00:00
|
|
|
#! /bin/sh
|
2004-06-15 07:32:36 +00:00
|
|
|
# FS QA Test No. 018
|
2001-01-15 05:01:19 +00:00
|
|
|
#
|
2003-10-06 07:46:19 +00:00
|
|
|
# xfs_logprint test - test v2 logs of different LR sizes
|
2001-01-15 05:01:19 +00:00
|
|
|
#
|
|
|
|
|
#-----------------------------------------------------------------------
|
2002-06-04 23:07:56 +00:00
|
|
|
# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
|
2001-01-15 05:01:19 +00:00
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# creator
|
2003-10-06 07:46:19 +00:00
|
|
|
owner=tes@sgi.com
|
2001-01-15 05:01:19 +00:00
|
|
|
|
|
|
|
|
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!
|
2001-01-15 05:01:19 +00:00
|
|
|
|
|
|
|
|
# get standard environment, filters and checks
|
|
|
|
|
. ./common.rc
|
|
|
|
|
. ./common.filter
|
2003-10-06 07:46:19 +00:00
|
|
|
. ./common.log
|
2001-01-15 05:01:19 +00:00
|
|
|
|
|
|
|
|
_cleanup()
|
|
|
|
|
{
|
2004-06-15 07:32:36 +00:00
|
|
|
cd /
|
2003-10-06 07:46:19 +00:00
|
|
|
_cleanup_logfiles
|
2002-05-09 07:24:12 +00:00
|
|
|
rm -f $tmp.*
|
2001-01-15 05:01:19 +00:00
|
|
|
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.*
|
2001-01-15 05:01:19 +00:00
|
|
|
_require_scratch
|
2006-03-30 03:54:16 +00:00
|
|
|
_require_v2log
|
2004-06-15 07:32:36 +00:00
|
|
|
|
2004-06-21 04:53:35 +00:00
|
|
|
# link correct .out file
|
|
|
|
|
_link_out_file $seq.op
|
|
|
|
|
|
|
|
|
|
|
2001-01-15 05:01:19 +00:00
|
|
|
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
|
2004-06-21 04:53:35 +00:00
|
|
|
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
|
2003-05-26 06:34:31 +00:00
|
|
|
|
2006-03-30 03:54:16 +00:00
|
|
|
if [ "$HOSTOS" = "IRIX" ]; then
|
2004-06-21 04:53:35 +00:00
|
|
|
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 \
|
2004-06-21 04:53:35 +00:00
|
|
|
| while read mkfs mnt
|
2003-09-30 06:31:43 +00:00
|
|
|
do
|
2006-03-30 03:54:16 +00:00
|
|
|
if [ "$mkfs" = "#" ]; then
|
2004-02-13 04:31:25 +00:00
|
|
|
continue
|
2003-09-30 06:31:43 +00:00
|
|
|
fi
|
2006-07-07 16:01:08 +00:00
|
|
|
export MKFS_OPTIONS="-l $mkfs"
|
|
|
|
|
export MOUNT_OPTIONS="-o noalign,$mnt"
|
2004-02-13 04:31:25 +00:00
|
|
|
_mkfs_log
|
|
|
|
|
_create_log
|
|
|
|
|
_check_log
|
|
|
|
|
|
|
|
|
|
_print_operation
|
|
|
|
|
_cmp_op_output $seq.op $filtered
|
|
|
|
|
|
2004-06-21 04:53:35 +00:00
|
|
|
_print_transaction_inode $start_blk
|
2004-02-13 04:31:25 +00:00
|
|
|
_cmp_output $seq.trans_inode $filtered
|
|
|
|
|
|
2004-06-21 04:53:35 +00:00
|
|
|
_print_transaction_buf $start_blk
|
2004-02-13 04:31:25 +00:00
|
|
|
_cmp_output $seq.trans_buf $filtered
|
2003-09-30 06:31:43 +00:00
|
|
|
done
|
2001-02-09 01:44:19 +00:00
|
|
|
|
2003-09-30 07:31:35 +00:00
|
|
|
# got thru it all so we may have success
|
2004-02-13 04:31:25 +00:00
|
|
|
status=0
|
2003-09-30 07:31:35 +00:00
|
|
|
|
2001-01-15 05:01:19 +00:00
|
|
|
exit
|