Files
apfstests/tests/xfs/018
T

104 lines
2.4 KiB
Bash
Raw Normal View History

#! /bin/bash
# FS QA Test No. 018
#
# 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.
2009-05-12 13:24:15 -05:00
#
# This program is free software; you can redistribute it and/or
# modify it under the terms 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. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
#-----------------------------------------------------------------------
#
2013-03-15 12:28:03 +00:00
seqfull=$0
seq=`basename $0`
seqres=$RESULT_DIR/$seq
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
2013-03-15 12:28:04 +00:00
. ./common/rc
. ./common/filter
. ./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.*
2015-12-21 18:07:43 +11:00
_scratch_unmount 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
rm -f $seqres.full $tmp.*
_require_scratch
_require_v2log
2004-06-15 07:32:36 +00:00
# link correct .out file
_link_out_file_named $seqfull.op $(_get_os_name)
echo "*** init FS"
2015-12-21 18:07:43 +11:00
_scratch_unmount >/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 MOUNT_OPTIONS="-o noalign,$mnt"
_mkfs_log "-l $mkfs"
_create_log
_check_log
_print_operation
2013-03-15 12:28:03 +00:00
_cmp_op_output $seqfull.op $filtered
_print_transaction_inode $start_blk
2013-03-15 12:28:03 +00:00
_cmp_output $seqfull.trans_inode $filtered
_print_transaction_buf $start_blk
2013-03-15 12:28:03 +00:00
_cmp_output $seqfull.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