mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
update to handle striped v2 logs
This commit is contained in:
@@ -171,6 +171,7 @@ _filter_logprint()
|
|||||||
s/^uuid: *[0-9a-f-][0-9a-f-]* *format: *.*$/uuid: <UUID> format: <FORMAT>/;
|
s/^uuid: *[0-9a-f-][0-9a-f-]* *format: *.*$/uuid: <UUID> format: <FORMAT>/;
|
||||||
/flushiter:/d;
|
/flushiter:/d;
|
||||||
/version:/,/h_size:/d;
|
/version:/,/h_size:/d;
|
||||||
|
/override tail/s/[0-9][0-9]*/<TAIL_BLK>/;
|
||||||
/^---*/d;
|
/^---*/d;
|
||||||
/^===*/d;
|
/^===*/d;
|
||||||
/^~~~*/d;
|
/^~~~*/d;
|
||||||
@@ -212,11 +213,12 @@ _print_operation()
|
|||||||
|
|
||||||
_print_transaction_inode()
|
_print_transaction_inode()
|
||||||
{
|
{
|
||||||
|
_start=$1
|
||||||
raw=$seq.trans_inode.mnt$mnt.mkfs$mkfs.raw
|
raw=$seq.trans_inode.mnt$mnt.mkfs$mkfs.raw
|
||||||
filtered=$seq.trans_inode.mnt$mnt.mkfs$mkfs.filtered
|
filtered=$seq.trans_inode.mnt$mnt.mkfs$mkfs.filtered
|
||||||
|
|
||||||
echo "### xfs_logprint -t -i -s 2 output ###" | tee $raw >$filtered
|
echo "### xfs_logprint -t -i -s START output ###" | tee $raw >$filtered
|
||||||
_scratch_xfs_logprint -t -i -s 2 2>&1 \
|
_scratch_xfs_logprint -t -i -s $_start 2>&1 \
|
||||||
| tee -a $raw \
|
| tee -a $raw \
|
||||||
| _filter_logprint \
|
| _filter_logprint \
|
||||||
>>$filtered
|
>>$filtered
|
||||||
@@ -224,11 +226,12 @@ _print_transaction_inode()
|
|||||||
|
|
||||||
_print_transaction_buf()
|
_print_transaction_buf()
|
||||||
{
|
{
|
||||||
|
_start=$1
|
||||||
raw=$seq.trans_buf.mnt$mnt.mkfs$mkfs.raw
|
raw=$seq.trans_buf.mnt$mnt.mkfs$mkfs.raw
|
||||||
filtered=$seq.trans_buf.mnt$mnt.mkfs$mkfs.filtered
|
filtered=$seq.trans_buf.mnt$mnt.mkfs$mkfs.filtered
|
||||||
|
|
||||||
echo "### xfs_logprint -t -b -s 2 output ###" | tee $raw >$filtered
|
echo "### xfs_logprint -t -b -s START output ###" | tee $raw >$filtered
|
||||||
_scratch_xfs_logprint -t -b -s 2 2>&1 \
|
_scratch_xfs_logprint -t -b -s $_start 2>&1 \
|
||||||
| tee -a $raw \
|
| tee -a $raw \
|
||||||
| _filter_logprint \
|
| _filter_logprint \
|
||||||
>>$filtered
|
>>$filtered
|
||||||
@@ -392,24 +395,24 @@ echo "*** init FS"
|
|||||||
umount $SCRATCH_DEV >/dev/null 2>&1
|
umount $SCRATCH_DEV >/dev/null 2>&1
|
||||||
|
|
||||||
cat >$tmp.seq.params <<EOF
|
cat >$tmp.seq.params <<EOF
|
||||||
# mkfs-opt mount-opt
|
# mkfs-opt mount-opt start-blk
|
||||||
-lversion=1 -ologbsize=32k
|
-lversion=1 -ologbsize=32k 2
|
||||||
-lversion=2 -ologbsize=32k
|
-lversion=2 -ologbsize=32k 2
|
||||||
-lversion=2 -ologbsize=64k
|
-lversion=2 -ologbsize=64k 2
|
||||||
-lversion=2 -ologbsize=128k
|
-lversion=2 -ologbsize=128k 2
|
||||||
-lversion=2 -ologbsize=256k
|
-lversion=2 -ologbsize=256k 2
|
||||||
# NB: Stripe only affects LRs which weren't full when written out
|
# NB: Stripe only affects LRs which weren't full when written out
|
||||||
# So if we wrote out 32K LR then the stripe has no effect
|
# So if we wrote out 32K LR then the stripe has no effect
|
||||||
# In our case, it is likely that the LRs will be full but
|
# In our case, it is likely that the LRs will be full but
|
||||||
# it may no be the case in all QA environments where the LR
|
# it may no be the case in all QA environments where the LR
|
||||||
# may be forced out early.
|
# may be forced out early.
|
||||||
# -lversion=2,su=4096 -ologbsize=32k
|
-lversion=2,su=4096 -ologbsize=32k 8
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# do the work for various log params which
|
# do the work for various log params which
|
||||||
# should not effect the data content of the log
|
# should not effect the data content of the log
|
||||||
cat $tmp.seq.params \
|
cat $tmp.seq.params \
|
||||||
| while read mkfs mnt
|
| while read mkfs mnt start
|
||||||
do
|
do
|
||||||
if [ "$mkfs" != "#" ]; then
|
if [ "$mkfs" != "#" ]; then
|
||||||
_mkfs_create_log $mkfs $mnt
|
_mkfs_create_log $mkfs $mnt
|
||||||
@@ -418,10 +421,10 @@ do
|
|||||||
_print_operation
|
_print_operation
|
||||||
_cmp_op_output $seq.noquota.op $filtered
|
_cmp_op_output $seq.noquota.op $filtered
|
||||||
|
|
||||||
_print_transaction_inode
|
_print_transaction_inode $start
|
||||||
_cmp_output $seq.noquota.trans_inode $filtered
|
_cmp_output $seq.noquota.trans_inode $filtered
|
||||||
|
|
||||||
_print_transaction_buf
|
_print_transaction_buf $start
|
||||||
_cmp_output $seq.noquota.trans_buf $filtered
|
_cmp_output $seq.noquota.trans_buf $filtered
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -431,7 +434,7 @@ mkfs="-lversion=1"
|
|||||||
mnt="-ousrquota,grpquota"
|
mnt="-ousrquota,grpquota"
|
||||||
_mkfs_create_log $mkfs $mnt
|
_mkfs_create_log $mkfs $mnt
|
||||||
_check_log
|
_check_log
|
||||||
_print_transaction_inode
|
_print_transaction_inode 2
|
||||||
_cmp_output $seq.ugquota.trans_inode $filtered
|
_cmp_output $seq.ugquota.trans_inode $filtered
|
||||||
|
|
||||||
# got thru it all so we may have success
|
# got thru it all so we may have success
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
### xfs_logprint -t -b -s 2 output ###
|
### xfs_logprint -t -b -s START output ###
|
||||||
xfs_logprint:
|
xfs_logprint:
|
||||||
data device: <DEVICE>
|
data device: <DEVICE>
|
||||||
log device: <DEVICE> daddr: <DADDR> length: <LENGTH>
|
log device: <DEVICE> daddr: <DADDR> length: <LENGTH>
|
||||||
log tail: <COUNT> head: <COUNT> state: <CLEAN>
|
log tail: <COUNT> head: <COUNT> state: <CLEAN>
|
||||||
override tail: 2
|
override tail: <TAIL_BLK>
|
||||||
TRANS: tid:<TID> type:CREATE #items:5 trans:0x0 q:<Q>
|
TRANS: tid:<TID> type:CREATE #items:5 trans:0x0 q:<Q>
|
||||||
BUF: cnt:2 total:2 a:<A> len:<LEN> a:<A> len:<LEN>
|
BUF: cnt:2 total:2 a:<A> len:<LEN> a:<A> len:<LEN>
|
||||||
BUF: #regs:2 start blkno:<BLKNO> len:<LEN> bmap size:1
|
BUF: #regs:2 start blkno:<BLKNO> len:<LEN> bmap size:1
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
### xfs_logprint -t -i -s 2 output ###
|
### xfs_logprint -t -i -s START output ###
|
||||||
xfs_logprint:
|
xfs_logprint:
|
||||||
data device: <DEVICE>
|
data device: <DEVICE>
|
||||||
log device: <DEVICE> daddr: <DADDR> length: <LENGTH>
|
log device: <DEVICE> daddr: <DADDR> length: <LENGTH>
|
||||||
log tail: <COUNT> head: <COUNT> state: <CLEAN>
|
log tail: <COUNT> head: <COUNT> state: <CLEAN>
|
||||||
override tail: 2
|
override tail: <TAIL_BLK>
|
||||||
TRANS: tid:<TID> type:CREATE #items:5 trans:0x0 q:<Q>
|
TRANS: tid:<TID> type:CREATE #items:5 trans:0x0 q:<Q>
|
||||||
BUF: cnt:2 total:2 a:<A> len:<LEN> a:<A> len:<LEN>
|
BUF: cnt:2 total:2 a:<A> len:<LEN> a:<A> len:<LEN>
|
||||||
BUF: #regs:2 start blkno:<BLKNO> len:<LEN> bmap size:1
|
BUF: #regs:2 start blkno:<BLKNO> len:<LEN> bmap size:1
|
||||||
|
|||||||
@@ -51,5 +51,14 @@ data = bsize=XXX blocks=XXX, imaxpct=PCT
|
|||||||
naming =VERN bsize=XXX
|
naming =VERN bsize=XXX
|
||||||
log =LDEV bsize=XXX blocks=XXX
|
log =LDEV bsize=XXX blocks=XXX
|
||||||
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
|
realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
|
||||||
|
*** compare logprint: 018.noquota.op with 018.op.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.filtered
|
||||||
|
*** compare logprint: 018.noquota.trans_inode with 018.trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.filtered
|
||||||
|
*** compare logprint: 018.noquota.trans_buf with 018.trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.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.ugquota.trans_inode with 018.trans_inode.mnt-ousrquota,grpquota.mkfs-lversion=1.filtered
|
*** compare logprint: 018.ugquota.trans_inode with 018.trans_inode.mnt-ousrquota,grpquota.mkfs-lversion=1.filtered
|
||||||
*** unmount
|
*** unmount
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
### xfs_logprint -t -i -s 2 output ###
|
### xfs_logprint -t -i -s START output ###
|
||||||
xfs_logprint:
|
xfs_logprint:
|
||||||
data device: <DEVICE>
|
data device: <DEVICE>
|
||||||
log device: <DEVICE> daddr: <DADDR> length: <LENGTH>
|
log device: <DEVICE> daddr: <DADDR> length: <LENGTH>
|
||||||
log tail: <COUNT> head: <COUNT> state: <CLEAN>
|
log tail: <COUNT> head: <COUNT> state: <CLEAN>
|
||||||
override tail: 2
|
override tail: <TAIL_BLK>
|
||||||
TRANS: tid:<TID> type:QM_QINOCREATE #items:4 trans:0x0 q:<Q>
|
TRANS: tid:<TID> type:QM_QINOCREATE #items:4 trans:0x0 q:<Q>
|
||||||
BUF: cnt:2 total:2 a:<A> len:<LEN> a:<A> len:<LEN>
|
BUF: cnt:2 total:2 a:<A> len:<LEN> a:<A> len:<LEN>
|
||||||
BUF: #regs:2 start blkno:<BLKNO> len:<LEN> bmap size:1
|
BUF: #regs:2 start blkno:<BLKNO> len:<LEN> bmap size:1
|
||||||
|
|||||||
Reference in New Issue
Block a user