Simplify and hopefully make more repeatable log/logprint

QA testing.
Get rid of unnecessary noquota suffix in name.
This commit is contained in:
ptools
2004-02-12 03:30:50 +00:00
parent 9f5c3ca42e
commit 56fbca73be
21 changed files with 22472 additions and 24160 deletions
+3 -3
View File
@@ -88,13 +88,13 @@ do
_check_log
_print_operation
_cmp_op_output $seq.noquota.op $filtered
_cmp_op_output $seq.op $filtered
_print_transaction_inode 2
_cmp_output $seq.noquota.trans_inode $filtered
_cmp_output $seq.trans_inode $filtered
_print_transaction_buf 2
_cmp_output $seq.noquota.trans_buf $filtered
_cmp_output $seq.trans_buf $filtered
fi
done
-5512
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+5226
View File
File diff suppressed because it is too large Load Diff
+15 -15
View File
@@ -6,43 +6,43 @@ data = bsize=XXX blocks=XXX, imaxpct=PCT
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** compare logprint: 018.noquota.op with 018.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=1.filtered
*** compare logprint: 018.noquota.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=1.filtered
*** compare logprint: 018.noquota.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=1.filtered
*** compare logprint: 018.op with 018.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=1.filtered
*** compare logprint: 018.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=1.filtered
*** compare logprint: 018.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=1.filtered
meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
data = bsize=XXX blocks=XXX, imaxpct=PCT
= sunit=XXX swidth=XXX, unwritten=X
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** compare logprint: 018.noquota.op with 018.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2.filtered
*** compare logprint: 018.noquota.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2.filtered
*** compare logprint: 018.noquota.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2.filtered
*** compare logprint: 018.op with 018.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2.filtered
*** compare logprint: 018.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2.filtered
*** compare logprint: 018.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2.filtered
meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
data = bsize=XXX blocks=XXX, imaxpct=PCT
= sunit=XXX swidth=XXX, unwritten=X
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** compare logprint: 018.noquota.op with 018.fulldir/op.mnt-ologbsize=64k.mkfs-lversion=2.filtered
*** compare logprint: 018.noquota.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=64k.mkfs-lversion=2.filtered
*** compare logprint: 018.noquota.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=64k.mkfs-lversion=2.filtered
*** compare logprint: 018.op with 018.fulldir/op.mnt-ologbsize=64k.mkfs-lversion=2.filtered
*** compare logprint: 018.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=64k.mkfs-lversion=2.filtered
*** compare logprint: 018.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=64k.mkfs-lversion=2.filtered
meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
data = bsize=XXX blocks=XXX, imaxpct=PCT
= sunit=XXX swidth=XXX, unwritten=X
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** compare logprint: 018.noquota.op with 018.fulldir/op.mnt-ologbsize=128k.mkfs-lversion=2.filtered
*** compare logprint: 018.noquota.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=128k.mkfs-lversion=2.filtered
*** compare logprint: 018.noquota.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=128k.mkfs-lversion=2.filtered
*** compare logprint: 018.op with 018.fulldir/op.mnt-ologbsize=128k.mkfs-lversion=2.filtered
*** compare logprint: 018.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=128k.mkfs-lversion=2.filtered
*** compare logprint: 018.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=128k.mkfs-lversion=2.filtered
meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
data = bsize=XXX blocks=XXX, imaxpct=PCT
= sunit=XXX swidth=XXX, unwritten=X
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** compare logprint: 018.noquota.op with 018.fulldir/op.mnt-ologbsize=256k.mkfs-lversion=2.filtered
*** compare logprint: 018.noquota.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=256k.mkfs-lversion=2.filtered
*** compare logprint: 018.noquota.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=256k.mkfs-lversion=2.filtered
*** compare logprint: 018.op with 018.fulldir/op.mnt-ologbsize=256k.mkfs-lversion=2.filtered
*** compare logprint: 018.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=256k.mkfs-lversion=2.filtered
*** compare logprint: 018.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=256k.mkfs-lversion=2.filtered
*** unmount
+2320
View File
File diff suppressed because it is too large Load Diff
+2908
View File
File diff suppressed because it is too large Load Diff
+1432 -1664
View File
File diff suppressed because it is too large Load Diff
+9 -4
View File
@@ -61,7 +61,6 @@ _cleanup()
trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here
_notrun "Not finished yet"
# prelim
rm -f $seq.full $tmp.*
@@ -75,8 +74,14 @@ cat >$tmp.seq.params <<EOF
-lversion=2 -ologbsize=32k 2
-lversion=2,su=4096 -ologbsize=32k 8
-lversion=2,su=32768 -ologbsize=32k 64
#
# expect following line to fail
#
-lversion=2,su=36864 -ologbsize=32k 72
#
# following is not a power of 2 BBs
#
-lversion=2,su=5120 -ologbsize=32k 10
EOF
# Do the work for various log params which
@@ -109,14 +114,14 @@ for s in sync nosync ; do
:
else
_print_operation
_cmp_op_output $seq.noquota.op $filtered
_cmp_op_output $seq.op $filtered
fi
_print_transaction_inode $start
_cmp_output $seq.noquota.trans_inode $filtered
_cmp_output $seq.trans_inode $filtered
_print_transaction_buf $start
_cmp_output $seq.noquota.trans_buf $filtered
_cmp_output $seq.trans_buf $filtered
fi
done
done
-5512
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+5216
View File
File diff suppressed because it is too large Load Diff
+15 -15
View File
@@ -7,8 +7,8 @@ data = bsize=XXX blocks=XXX, imaxpct=PCT
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** compare logprint: 082.noquota.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2.sync.filtered
*** compare logprint: 082.noquota.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2.sync.filtered
*** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2.sync.filtered
*** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2.sync.filtered
--- mkfs=-lversion=2,su=4096, mnt=-ologbsize=32k, start=8, sync=sync ---
meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
data = bsize=XXX blocks=XXX, imaxpct=PCT
@@ -16,8 +16,8 @@ data = bsize=XXX blocks=XXX, imaxpct=PCT
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** compare logprint: 082.noquota.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.sync.filtered
*** compare logprint: 082.noquota.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.sync.filtered
*** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.sync.filtered
*** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.sync.filtered
--- mkfs=-lversion=2,su=32768, mnt=-ologbsize=32k, start=64, sync=sync ---
meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
data = bsize=XXX blocks=XXX, imaxpct=PCT
@@ -25,8 +25,8 @@ data = bsize=XXX blocks=XXX, imaxpct=PCT
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** compare logprint: 082.noquota.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.sync.filtered
*** compare logprint: 082.noquota.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.sync.filtered
*** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.sync.filtered
*** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.sync.filtered
--- mkfs=-lversion=2,su=36864, mnt=-ologbsize=32k, start=72, sync=sync ---
meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
data = bsize=XXX blocks=XXX, imaxpct=PCT
@@ -43,9 +43,9 @@ data = bsize=XXX blocks=XXX, imaxpct=PCT
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** compare logprint: 082.noquota.op with 082.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2.nosync.filtered
*** compare logprint: 082.noquota.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2.nosync.filtered
*** compare logprint: 082.noquota.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2.nosync.filtered
*** compare logprint: 082.op with 082.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2.nosync.filtered
*** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2.nosync.filtered
*** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2.nosync.filtered
--- mkfs=-lversion=2,su=4096, mnt=-ologbsize=32k, start=8, sync=nosync ---
meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
data = bsize=XXX blocks=XXX, imaxpct=PCT
@@ -53,9 +53,9 @@ data = bsize=XXX blocks=XXX, imaxpct=PCT
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** compare logprint: 082.noquota.op with 082.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.nosync.filtered
*** compare logprint: 082.noquota.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.nosync.filtered
*** compare logprint: 082.noquota.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.nosync.filtered
*** compare logprint: 082.op with 082.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.nosync.filtered
*** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.nosync.filtered
*** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.nosync.filtered
--- mkfs=-lversion=2,su=32768, mnt=-ologbsize=32k, start=64, sync=nosync ---
meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
data = bsize=XXX blocks=XXX, imaxpct=PCT
@@ -63,9 +63,9 @@ data = bsize=XXX blocks=XXX, imaxpct=PCT
naming =VERN bsize=XXX
log =LDEV bsize=XXX blocks=XXX
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
*** compare logprint: 082.noquota.op with 082.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.nosync.filtered
*** compare logprint: 082.noquota.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.nosync.filtered
*** compare logprint: 082.noquota.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.nosync.filtered
*** compare logprint: 082.op with 082.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.nosync.filtered
*** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.nosync.filtered
*** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.nosync.filtered
--- mkfs=-lversion=2,su=36864, mnt=-ologbsize=32k, start=72, sync=nosync ---
meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
data = bsize=XXX blocks=XXX, imaxpct=PCT
+2320
View File
File diff suppressed because it is too large Load Diff
+2908
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -52,7 +52,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
# get standard environment, filters and checks
. ./common.rc
. ./common.filter
. ./common.log
# real QA test starts here
+26 -8
View File
@@ -410,14 +410,6 @@ biggg 102400 $nobody $nobody 777 attr2 some_text2 root
sub/smalll 10 $nobody $nobody 777 attr3 some_text3 user
sub/biggg 102400 $nobody $nobody 777 attr4 some_text4 root
dir d $nobody $nobody 777 attr5 dir_text user
xflag_realtime 10 $nobody $nobody 777 XFS_XFLAG_REALTIME some_text5 root
xflag_prealloc 10 $nobody $nobody 777 XFS_XFLAG_PREALLOC some_text6 root
xflag_immutable 10 $nobody $nobody 777 XFS_XFLAG_IMMUTABLE some_text7 root
xflag_append 10 $nobody $nobody 777 XFS_XFLAG_APPEND some_text8 root
xflag_sync 10 $nobody $nobody 777 XFS_XFLAG_SYNC some_text9 root
xflag_noatime 10 $nobody $nobody 777 XFS_XFLAG_NOATIME some_text10 root
xflag_nodump 10 $nobody $nobody 777 XFS_XFLAG_NODUMP some_text11 root
xflag_hasattr 10 $nobody $nobody 777 XFS_XFLAG_HASATTR some_text12 root
#
# Add more files so that there are more than the number
# of streams.
@@ -442,6 +434,25 @@ sub/n 8192 $nobody $nobody
End-of-File
}
#
# extended file attribute flags
#
_mk_fillconfig_xattr()
{
cat <<End-of-File >$tmp.config
# pathname size user group perm name
#
xflag_realtime 10 $nobody $nobody 777 XFS_XFLAG_REALTIME
xflag_prealloc 10 $nobody $nobody 777 XFS_XFLAG_PREALLOC
xflag_immutable 10 $nobody $nobody 777 XFS_XFLAG_IMMUTABLE
xflag_append 10 $nobody $nobody 777 XFS_XFLAG_APPEND
xflag_sync 10 $nobody $nobody 777 XFS_XFLAG_SYNC
xflag_noatime 10 $nobody $nobody 777 XFS_XFLAG_NOATIME
xflag_nodump 10 $nobody $nobody 777 XFS_XFLAG_NODUMP
xflag_hasattr 10 $nobody $nobody 777 XFS_XFLAG_HASATTR
End-of-File
}
#
# Create a bunch of directories/files of different sizes
# filled with data.
@@ -506,12 +517,19 @@ _do_create_dumpdir_fill()
if [ -n "$perms" ]; then
chmod $perms $file
fi
# extended attributes (EA)
if [ -n "$ea_name" -a -n "$ea_value" ]; then
if [ "X$namespace" = "Xroot" ]; then
attr -R -s $ea_name -V $ea_value $file
else
attr -s $ea_name -V $ea_value $file
fi
# extended file attribute flags - no value - NOT EAs
elif [ -n "$ea_name" -a -z "$ea_value" ]; then
# set the flag
# TODO XXX
# use xfs_io to send the ioctl
:
fi
$verbose && echo -n "."
done
+61 -40
View File
@@ -71,31 +71,25 @@ _full()
_filter_opnum()
{
$AWK_PROG '
function extract_opnum(str) {
# e.g. "(379):" => "379"
gsub(/[():]/,"",str)
return str
}
BEGIN {
opnum = -1
#debug = 1
debug = 0
}
/^Oper/ && debug {
printf "line = %s\n", $0
}
/^Oper/ {
was_cont = 0
prev_opnum = opnum
opnum = extract_opnum($2)
}
/^Oper/ && /flags: CONTINUE/ {
# this will be the first op of split region
$9 = "none" # overwrite CONTINUE flags
$2 = sprintf("(%d):", remember+opnum)
remember += opnum
print
print "Not printing rest"
was_cont = 1
next
}
/^Oper/ && /flags: WAS_CONT END/ {
# this will be the last op of split region
# skip over was-continued op
# we assume there can be only 1
was_cont = 1
@@ -105,27 +99,23 @@ BEGIN {
# skip over any continued op stuff
next
}
/^Oper/ && /UNMOUNT/ {
remember = 0
opnum = -1
print
next
}
/^Oper/ && (opnum == 0) {
# have operation 0 with NO continued op
remember += (prev_opnum+1)
}
/^Oper/ && debug { printf "line2 = %s, remember = %d, prev_opnum = %d\n", $0, remember, prev_opnum}
/^Oper/ && (remember > 0) {
# add in opnum accumulation from previous LRs
$2 = sprintf("(%d):", remember+opnum)
print
next
}
{print}
'
}
#
# Filter out things that can change
# We have complexities which change when log is sync'ed at different
# times.
# Example1: DATA FORK EXTENTS
# These will not show up if inode is sync'ed sooner
# /DATA FORK EXTENTS/d;
# /INODE:/s/flags:0x5/flags:0x1/g;
# define XFS_ILOG_CORE 0x001 /* log standard inode fields */
# define XFS_ILOG_DEXT 0x004 /* log i_df.if_extents */
#
#
_filter_logprint()
{
_fix_malloc |\
@@ -164,9 +154,47 @@ _filter_logprint()
/^~~~*/d;
/extended-header/d;
/LOG REC AT LSN/d;
/DATA FORK EXTENTS/d;
s/BUF: cnt:[1-9][0-9]* total:[1-9][0-9]*.*/BUF: cnt:C total:T/;
s/INO: cnt:[1-9][0-9]* total:[1-9][0-9]*.*/INO: cnt:C total:T/;
s/#regs: *[1-9][0-9]*/#regs:R/;
/INODE:/s/flags:0x5/flags:0x1/g;
s/Oper ([0-9][0-9]*)/Oper (OPNUM)/;
/^[ ]*$/d;
s/ */ /g;
s/ $//;
' |\
awk '
# collapse BUF DATA group into 1 line
# for Oper data this can be over separate operations...ughh
/BUF DATA/ {
if (!buf_data) { # 1st one
if (oper) {
print oper
oper = 0
}
print
}
buf_data = 1
oper = 0 # wont need it now
next
}
/^Oper/ {
# store it as we dont know if 2nd BUF DATA is to follow
if (oper) {
print oper
}
oper = $0
next
}
{
buf_data = 0
if (oper) { # now we can print out oper
print oper
oper = 0
}
print
}
'
}
@@ -323,7 +351,9 @@ _clear_opts()
# "-x woof -o -y wow" -> "-x woof -y wow"
MKFS_OPTIONS=`echo $MKFS_OPTIONS | sed -e 's/-l[ ]*[^ $]*//g'`
MOUNT_OPTIONS=`echo $MOUNT_OPTIONS |\
sed -e 's/logbsize=[^ ,]*,*//g' \
sed \
-e 's/logbsize=[^ ,]*,*//g' \
-e 's/logbufs=[^ ,]*,*//g' \
-e 's/usrquota,*//g' \
-e 's/grpquota,*//g' \
-e 's/quota,*//g' \
@@ -370,17 +400,8 @@ _process_op_diff()
BEGIN { num_splits = 1 }
/^[0-9]/ {
# ensure cmd is a change op
cmd = $1
gsub(/[0-9][0-9]*/,"", cmd)
gsub(/,/,"", cmd)
if (cmd != "c") {
print "bad diff cmd: ", $0
exit 1
}
# ensure a split happened in previous difference
if (num_splits != 1 && num_splits != 2) {
if (num_splits < 1 || num_splits > 3) {
print num_splits, " split(s) found prior to diff cmd: ", $0
num_splits = 1 # shut-up end condition
exit 1
@@ -395,7 +416,7 @@ _process_op_diff()
}
{ next }
END {
if (num_splits != 1 && num_splits != 2) {
if (num_splits < 1 || num_splits > 3) {
print num_splits, " split(s) found prior to diff end"
exit 1
}

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