2001-01-15 05:01:19 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
# XFS QA Test No. 018
|
|
|
|
|
#
|
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
|
|
|
#
|
|
|
|
|
# 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
|
|
|
|
|
# published by the Free Software Foundation.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it would be useful, but
|
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
#
|
|
|
|
|
# Further, this software is distributed without any warranty that it is
|
|
|
|
|
# free of the rightful claim of any third person regarding infringement
|
|
|
|
|
# or the like. Any license provided herein, whether implied or
|
|
|
|
|
# otherwise, applies only to this software file. Patent licenses, if
|
|
|
|
|
# any, provided herein do not apply to combinations of this program with
|
|
|
|
|
# other software, or any other product whatsoever.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License along
|
|
|
|
|
# with this program; if not, write the Free Software Foundation, Inc., 59
|
|
|
|
|
# Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
|
|
|
|
#
|
|
|
|
|
# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
|
|
|
|
|
# Mountain View, CA 94043, or:
|
|
|
|
|
#
|
|
|
|
|
# http://www.sgi.com
|
|
|
|
|
#
|
|
|
|
|
# For further information regarding this notice, see:
|
|
|
|
|
#
|
|
|
|
|
# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
|
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# 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()
|
|
|
|
|
{
|
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
|
|
|
echo "*** unmount"
|
|
|
|
|
umount $SCRATCH_MNT 2>/dev/null
|
|
|
|
|
}
|
|
|
|
|
trap "_cleanup; exit \$status" 0 1 2 3 15
|
|
|
|
|
|
|
|
|
|
# real QA test starts here
|
|
|
|
|
|
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
|
2003-09-30 06:31:43 +00:00
|
|
|
_clear_opts
|
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
|
|
|
|
|
-lversion=1 -ologbsize=32k
|
|
|
|
|
-lversion=2 -ologbsize=32k
|
|
|
|
|
-lversion=2 -ologbsize=64k
|
|
|
|
|
-lversion=2 -ologbsize=128k
|
|
|
|
|
-lversion=2 -ologbsize=256k
|
2003-09-30 06:31:43 +00:00
|
|
|
EOF
|
2003-05-26 06:34:31 +00:00
|
|
|
|
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 \
|
2003-10-06 07:46:19 +00:00
|
|
|
| while read mkfs mnt restofline
|
2003-09-30 06:31:43 +00:00
|
|
|
do
|
|
|
|
|
if [ "$mkfs" != "#" ]; then
|
2003-10-06 07:46:19 +00:00
|
|
|
_mkfs_log $mkfs
|
|
|
|
|
_create_log $mnt
|
2003-09-30 06:31:43 +00:00
|
|
|
_check_log
|
2002-05-09 07:24:12 +00:00
|
|
|
|
2003-09-30 06:31:43 +00:00
|
|
|
_print_operation
|
|
|
|
|
_cmp_op_output $seq.noquota.op $filtered
|
2002-05-09 07:24:12 +00:00
|
|
|
|
2003-10-06 07:46:19 +00:00
|
|
|
_print_transaction_inode 2
|
2003-09-30 06:31:43 +00:00
|
|
|
_cmp_output $seq.noquota.trans_inode $filtered
|
2001-02-09 01:44:19 +00:00
|
|
|
|
2003-10-06 07:46:19 +00:00
|
|
|
_print_transaction_buf 2
|
2003-09-30 06:31:43 +00:00
|
|
|
_cmp_output $seq.noquota.trans_buf $filtered
|
|
|
|
|
fi
|
|
|
|
|
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
|
|
|
|
|
if [ ! -e $tmp.error ]; then
|
|
|
|
|
status=0
|
|
|
|
|
fi
|
|
|
|
|
|
2001-01-15 05:01:19 +00:00
|
|
|
exit
|