From: Eryu Guan <guaneryu@gmail.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH] xfs/033: don't use repair output in golden output
Date: Sat, 20 Apr 2019 16:53:32 +0800 [thread overview]
Message-ID: <20190420085332.GC22372@desktop> (raw)
In-Reply-To: <8b214be1-6f7e-f668-39ef-2e188f44d352@redhat.com>
On Thu, Apr 18, 2019 at 12:01:31PM -0500, Eric Sandeen wrote:
> With the xfs_repair fixes for how the link count on root inodes
> are handled, xfs/033 started failing because we didn't have to
> re-fix the link count at the end of the repair run.
>
> Capturing and comparing all of the xfs_repair output seems somewhat
> fragile in general. It should suffice to just run repair, then
> check that it succeeded with _scratch_xfs_repair, rather than
> comparing against all the detailed output. So, this patch does that.
> Full repair output is still saved to the $seqres.full file.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> diff --git a/.gitignore b/.gitignore
> index c13fb713..2482dd61 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -251,7 +251,6 @@
> /dmapi/src/suite2/src/test_rights
>
> # Symlinked files
> -/tests/xfs/033.out
> /tests/xfs/071.out
> /tests/xfs/096.out
>
> diff --git a/common/repair b/common/repair
> index c94939c9..5e53f5f2 100644
> --- a/common/repair
> +++ b/common/repair
> @@ -114,7 +114,7 @@ _check_repair()
> _scratch_unmount
>
> _zero_position $value "$structure"
> - _scratch_xfs_repair 2>&1 | _filter_repair
> + _scratch_xfs_repair 2>&1 | _filter_repair >> $seqres.full
Looks like this will break ohter tests that depend on the output of
_check_repair, e.g. xfs/030 and xfs/148 (xfs/031 and xfs/149 also call
_check_repair, but they have their local definition of _check_repair)
Thanks,
Eryu
>
> # some basic sanity checks...
> _check_scratch_fs
> diff --git a/tests/xfs/033 b/tests/xfs/033
> index 5af0aefc..8608b19c 100755
> --- a/tests/xfs/033
> +++ b/tests/xfs/033
> @@ -29,6 +29,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
> . ./common/filter
> . ./common/repair
>
> +rm -f $seqres.full
> +
> # nuke the root, rt bitmap, and rt summary inodes
> #
> _check_root_inos()
> @@ -69,12 +71,6 @@ if [ $isize -lt 512 ]; then
> . $tmp.mkfs
> fi
>
> -# link correct .out file
> -FEATURES=
> -if [ $_fs_has_crcs -eq 1 ]; then
> - FEATURES=crc
> -fi
> -_link_out_file_named $seqfull.out "$FEATURES"
>
> `xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \
> sed -e 's/ //g' -e 's/^/export /'`
> diff --git a/tests/xfs/033.out b/tests/xfs/033.out
> new file mode 100644
> index 00000000..213cfffe
> --- /dev/null
> +++ b/tests/xfs/033.out
> @@ -0,0 +1,13 @@
> +QA output created by 033
> +Corrupting root inode - setting bits to 0
> +Wrote X.XXKb (value 0x0)
> +Corrupting rt bitmap inode - setting bits to 0
> +Wrote X.XXKb (value 0x0)
> +Corrupting rt summary inode - setting bits to 0
> +Wrote X.XXKb (value 0x0)
> +Corrupting root inode - setting bits to -1
> +Wrote X.XXKb (value 0xffffffff)
> +Corrupting rt bitmap inode - setting bits to -1
> +Wrote X.XXKb (value 0xffffffff)
> +Corrupting rt summary inode - setting bits to -1
> +Wrote X.XXKb (value 0xffffffff)
> diff --git a/tests/xfs/033.out.crc b/tests/xfs/033.out.crc
> deleted file mode 100644
> index 2ab4c432..00000000
> --- a/tests/xfs/033.out.crc
> +++ /dev/null
> @@ -1,191 +0,0 @@
> -QA output created by 033
> -Corrupting root inode - setting bits to 0
> -Wrote X.XXKb (value 0x0)
> -Phase 1 - find and verify superblock...
> -Phase 2 - using <TYPEOF> log
> - - zero log...
> - - scan filesystem freespace and inode maps...
> - - found root inode chunk
> -Phase 3 - for each AG...
> - - scan and clear agi unlinked lists...
> - - process known inodes and perform inode discovery...
> -bad magic number 0x0 on inode INO
> -bad version number 0x0 on inode INO
> -inode identifier 0 mismatch on inode INO
> -bad magic number 0x0 on inode INO, resetting magic number
> -bad version number 0x0 on inode INO, resetting version number
> -inode identifier 0 mismatch on inode INO
> -cleared root inode INO
> - - process newly discovered inodes...
> -Phase 4 - check for duplicate blocks...
> - - setting up duplicate extent list...
> -root inode lost
> - - check for inodes claiming duplicate blocks...
> -Phase 5 - rebuild AG headers and trees...
> - - reset superblock...
> -Phase 6 - check inode connectivity...
> -reinitializing root directory
> - - resetting contents of realtime bitmap and summary inodes
> - - traversing filesystem ...
> - - traversal finished ...
> - - moving disconnected inodes to lost+found ...
> -Phase 7 - verify and correct link counts...
> -resetting inode INO nlinks from 1 to 2
> -done
> -Corrupting rt bitmap inode - setting bits to 0
> -Wrote X.XXKb (value 0x0)
> -Phase 1 - find and verify superblock...
> -Phase 2 - using <TYPEOF> log
> - - zero log...
> - - scan filesystem freespace and inode maps...
> - - found root inode chunk
> -Phase 3 - for each AG...
> - - scan and clear agi unlinked lists...
> - - process known inodes and perform inode discovery...
> -bad magic number 0x0 on inode INO
> -bad version number 0x0 on inode INO
> -inode identifier 0 mismatch on inode INO
> -bad magic number 0x0 on inode INO, resetting magic number
> -bad version number 0x0 on inode INO, resetting version number
> -inode identifier 0 mismatch on inode INO
> -cleared realtime bitmap inode INO
> - - process newly discovered inodes...
> -Phase 4 - check for duplicate blocks...
> - - setting up duplicate extent list...
> - - check for inodes claiming duplicate blocks...
> -Phase 5 - rebuild AG headers and trees...
> - - reset superblock...
> -Phase 6 - check inode connectivity...
> -reinitializing realtime bitmap inode
> - - resetting contents of realtime bitmap and summary inodes
> - - traversing filesystem ...
> - - traversal finished ...
> - - moving disconnected inodes to lost+found ...
> -Phase 7 - verify and correct link counts...
> -done
> -Corrupting rt summary inode - setting bits to 0
> -Wrote X.XXKb (value 0x0)
> -Phase 1 - find and verify superblock...
> -Phase 2 - using <TYPEOF> log
> - - zero log...
> - - scan filesystem freespace and inode maps...
> - - found root inode chunk
> -Phase 3 - for each AG...
> - - scan and clear agi unlinked lists...
> - - process known inodes and perform inode discovery...
> -bad magic number 0x0 on inode INO
> -bad version number 0x0 on inode INO
> -inode identifier 0 mismatch on inode INO
> -bad magic number 0x0 on inode INO, resetting magic number
> -bad version number 0x0 on inode INO, resetting version number
> -inode identifier 0 mismatch on inode INO
> -cleared realtime summary inode INO
> - - process newly discovered inodes...
> -Phase 4 - check for duplicate blocks...
> - - setting up duplicate extent list...
> - - check for inodes claiming duplicate blocks...
> -Phase 5 - rebuild AG headers and trees...
> - - reset superblock...
> -Phase 6 - check inode connectivity...
> -reinitializing realtime summary inode
> - - resetting contents of realtime bitmap and summary inodes
> - - traversing filesystem ...
> - - traversal finished ...
> - - moving disconnected inodes to lost+found ...
> -Phase 7 - verify and correct link counts...
> -done
> -Corrupting root inode - setting bits to -1
> -Wrote X.XXKb (value 0xffffffff)
> -Phase 1 - find and verify superblock...
> -Phase 2 - using <TYPEOF> log
> - - zero log...
> - - scan filesystem freespace and inode maps...
> - - found root inode chunk
> -Phase 3 - for each AG...
> - - scan and clear agi unlinked lists...
> - - process known inodes and perform inode discovery...
> -bad magic number 0xffff on inode INO
> -bad version number 0xffffffff on inode INO
> -inode identifier 18446744073709551615 mismatch on inode INO
> -bad magic number 0xffff on inode INO, resetting magic number
> -bad version number 0xffffffff on inode INO, resetting version number
> -inode identifier 18446744073709551615 mismatch on inode INO
> -cleared root inode INO
> - - process newly discovered inodes...
> -Phase 4 - check for duplicate blocks...
> - - setting up duplicate extent list...
> -root inode lost
> - - check for inodes claiming duplicate blocks...
> -Phase 5 - rebuild AG headers and trees...
> - - reset superblock...
> -Phase 6 - check inode connectivity...
> -reinitializing root directory
> - - resetting contents of realtime bitmap and summary inodes
> - - traversing filesystem ...
> - - traversal finished ...
> - - moving disconnected inodes to lost+found ...
> -Phase 7 - verify and correct link counts...
> -resetting inode INO nlinks from 1 to 2
> -done
> -Corrupting rt bitmap inode - setting bits to -1
> -Wrote X.XXKb (value 0xffffffff)
> -Phase 1 - find and verify superblock...
> -Phase 2 - using <TYPEOF> log
> - - zero log...
> - - scan filesystem freespace and inode maps...
> - - found root inode chunk
> -Phase 3 - for each AG...
> - - scan and clear agi unlinked lists...
> - - process known inodes and perform inode discovery...
> -bad magic number 0xffff on inode INO
> -bad version number 0xffffffff on inode INO
> -inode identifier 18446744073709551615 mismatch on inode INO
> -bad magic number 0xffff on inode INO, resetting magic number
> -bad version number 0xffffffff on inode INO, resetting version number
> -inode identifier 18446744073709551615 mismatch on inode INO
> -cleared realtime bitmap inode INO
> - - process newly discovered inodes...
> -Phase 4 - check for duplicate blocks...
> - - setting up duplicate extent list...
> - - check for inodes claiming duplicate blocks...
> -Phase 5 - rebuild AG headers and trees...
> - - reset superblock...
> -Phase 6 - check inode connectivity...
> -reinitializing realtime bitmap inode
> - - resetting contents of realtime bitmap and summary inodes
> - - traversing filesystem ...
> - - traversal finished ...
> - - moving disconnected inodes to lost+found ...
> -Phase 7 - verify and correct link counts...
> -done
> -Corrupting rt summary inode - setting bits to -1
> -Wrote X.XXKb (value 0xffffffff)
> -Phase 1 - find and verify superblock...
> -Phase 2 - using <TYPEOF> log
> - - zero log...
> - - scan filesystem freespace and inode maps...
> - - found root inode chunk
> -Phase 3 - for each AG...
> - - scan and clear agi unlinked lists...
> - - process known inodes and perform inode discovery...
> -bad magic number 0xffff on inode INO
> -bad version number 0xffffffff on inode INO
> -inode identifier 18446744073709551615 mismatch on inode INO
> -bad magic number 0xffff on inode INO, resetting magic number
> -bad version number 0xffffffff on inode INO, resetting version number
> -inode identifier 18446744073709551615 mismatch on inode INO
> -cleared realtime summary inode INO
> - - process newly discovered inodes...
> -Phase 4 - check for duplicate blocks...
> - - setting up duplicate extent list...
> - - check for inodes claiming duplicate blocks...
> -Phase 5 - rebuild AG headers and trees...
> - - reset superblock...
> -Phase 6 - check inode connectivity...
> -reinitializing realtime summary inode
> - - resetting contents of realtime bitmap and summary inodes
> - - traversing filesystem ...
> - - traversal finished ...
> - - moving disconnected inodes to lost+found ...
> -Phase 7 - verify and correct link counts...
> -done
> diff --git a/tests/xfs/033.out.default b/tests/xfs/033.out.default
> deleted file mode 100644
> index 68bc7810..00000000
> --- a/tests/xfs/033.out.default
> +++ /dev/null
> @@ -1,188 +0,0 @@
> -QA output created by 033
> -Corrupting root inode - setting bits to 0
> -Wrote X.XXKb (value 0x0)
> -Phase 1 - find and verify superblock...
> -Phase 2 - using <TYPEOF> log
> - - zero log...
> - - scan filesystem freespace and inode maps...
> - - found root inode chunk
> -Phase 3 - for each AG...
> - - scan and clear agi unlinked lists...
> - - process known inodes and perform inode discovery...
> -bad magic number 0x0 on inode INO
> -bad version number 0x0 on inode INO
> -bad magic number 0x0 on inode INO, resetting magic number
> -bad version number 0x0 on inode INO, resetting version number
> -imap claims a free inode INO is in use, correcting imap and clearing inode
> -cleared root inode INO
> - - process newly discovered inodes...
> -Phase 4 - check for duplicate blocks...
> - - setting up duplicate extent list...
> -root inode lost
> - - check for inodes claiming duplicate blocks...
> -Phase 5 - rebuild AG headers and trees...
> - - reset superblock...
> -Phase 6 - check inode connectivity...
> -reinitializing root directory
> - - resetting contents of realtime bitmap and summary inodes
> - - traversing filesystem ...
> - - traversal finished ...
> - - moving disconnected inodes to lost+found ...
> -Phase 7 - verify and correct link counts...
> -resetting inode INO nlinks from 1 to 2
> -done
> -Corrupting rt bitmap inode - setting bits to 0
> -Wrote X.XXKb (value 0x0)
> -Phase 1 - find and verify superblock...
> -Phase 2 - using <TYPEOF> log
> - - zero log...
> - - scan filesystem freespace and inode maps...
> - - found root inode chunk
> -Phase 3 - for each AG...
> - - scan and clear agi unlinked lists...
> - - process known inodes and perform inode discovery...
> -bad magic number 0x0 on inode INO
> -bad version number 0x0 on inode INO
> -bad magic number 0x0 on inode INO, resetting magic number
> -bad version number 0x0 on inode INO, resetting version number
> -imap claims a free inode INO is in use, correcting imap and clearing inode
> -cleared realtime bitmap inode INO
> - - process newly discovered inodes...
> -Phase 4 - check for duplicate blocks...
> - - setting up duplicate extent list...
> - - check for inodes claiming duplicate blocks...
> -Phase 5 - rebuild AG headers and trees...
> - - reset superblock...
> -Phase 6 - check inode connectivity...
> -reinitializing realtime bitmap inode
> - - resetting contents of realtime bitmap and summary inodes
> - - traversing filesystem ...
> - - traversal finished ...
> - - moving disconnected inodes to lost+found ...
> -Phase 7 - verify and correct link counts...
> -done
> -Corrupting rt summary inode - setting bits to 0
> -Wrote X.XXKb (value 0x0)
> -Phase 1 - find and verify superblock...
> -Phase 2 - using <TYPEOF> log
> - - zero log...
> - - scan filesystem freespace and inode maps...
> - - found root inode chunk
> -Phase 3 - for each AG...
> - - scan and clear agi unlinked lists...
> - - process known inodes and perform inode discovery...
> -bad magic number 0x0 on inode INO
> -bad version number 0x0 on inode INO
> -bad magic number 0x0 on inode INO, resetting magic number
> -bad version number 0x0 on inode INO, resetting version number
> -imap claims a free inode INO is in use, correcting imap and clearing inode
> -cleared realtime summary inode INO
> - - process newly discovered inodes...
> -Phase 4 - check for duplicate blocks...
> - - setting up duplicate extent list...
> - - check for inodes claiming duplicate blocks...
> -Phase 5 - rebuild AG headers and trees...
> - - reset superblock...
> -Phase 6 - check inode connectivity...
> -reinitializing realtime summary inode
> - - resetting contents of realtime bitmap and summary inodes
> - - traversing filesystem ...
> - - traversal finished ...
> - - moving disconnected inodes to lost+found ...
> -Phase 7 - verify and correct link counts...
> -done
> -Corrupting root inode - setting bits to -1
> -Wrote X.XXKb (value 0xffffffff)
> -Phase 1 - find and verify superblock...
> -Phase 2 - using <TYPEOF> log
> - - zero log...
> - - scan filesystem freespace and inode maps...
> - - found root inode chunk
> -Phase 3 - for each AG...
> - - scan and clear agi unlinked lists...
> - - process known inodes and perform inode discovery...
> -bad magic number 0xffff on inode INO
> -bad version number 0xffffffff on inode INO
> -bad (negative) size -1 on inode INO
> -bad magic number 0xffff on inode INO, resetting magic number
> -bad version number 0xffffffff on inode INO, resetting version number
> -bad (negative) size -1 on inode INO
> -cleared root inode INO
> - - process newly discovered inodes...
> -Phase 4 - check for duplicate blocks...
> - - setting up duplicate extent list...
> -root inode lost
> - - check for inodes claiming duplicate blocks...
> -Phase 5 - rebuild AG headers and trees...
> - - reset superblock...
> -Phase 6 - check inode connectivity...
> -reinitializing root directory
> - - resetting contents of realtime bitmap and summary inodes
> - - traversing filesystem ...
> - - traversal finished ...
> - - moving disconnected inodes to lost+found ...
> -Phase 7 - verify and correct link counts...
> -resetting inode INO nlinks from 1 to 2
> -done
> -Corrupting rt bitmap inode - setting bits to -1
> -Wrote X.XXKb (value 0xffffffff)
> -Phase 1 - find and verify superblock...
> -Phase 2 - using <TYPEOF> log
> - - zero log...
> - - scan filesystem freespace and inode maps...
> - - found root inode chunk
> -Phase 3 - for each AG...
> - - scan and clear agi unlinked lists...
> - - process known inodes and perform inode discovery...
> -bad magic number 0xffff on inode INO
> -bad version number 0xffffffff on inode INO
> -bad (negative) size -1 on inode INO
> -bad magic number 0xffff on inode INO, resetting magic number
> -bad version number 0xffffffff on inode INO, resetting version number
> -bad (negative) size -1 on inode INO
> -cleared realtime bitmap inode INO
> - - process newly discovered inodes...
> -Phase 4 - check for duplicate blocks...
> - - setting up duplicate extent list...
> - - check for inodes claiming duplicate blocks...
> -Phase 5 - rebuild AG headers and trees...
> - - reset superblock...
> -Phase 6 - check inode connectivity...
> -reinitializing realtime bitmap inode
> - - resetting contents of realtime bitmap and summary inodes
> - - traversing filesystem ...
> - - traversal finished ...
> - - moving disconnected inodes to lost+found ...
> -Phase 7 - verify and correct link counts...
> -done
> -Corrupting rt summary inode - setting bits to -1
> -Wrote X.XXKb (value 0xffffffff)
> -Phase 1 - find and verify superblock...
> -Phase 2 - using <TYPEOF> log
> - - zero log...
> - - scan filesystem freespace and inode maps...
> - - found root inode chunk
> -Phase 3 - for each AG...
> - - scan and clear agi unlinked lists...
> - - process known inodes and perform inode discovery...
> -bad magic number 0xffff on inode INO
> -bad version number 0xffffffff on inode INO
> -bad (negative) size -1 on inode INO
> -bad magic number 0xffff on inode INO, resetting magic number
> -bad version number 0xffffffff on inode INO, resetting version number
> -bad (negative) size -1 on inode INO
> -cleared realtime summary inode INO
> - - process newly discovered inodes...
> -Phase 4 - check for duplicate blocks...
> - - setting up duplicate extent list...
> - - check for inodes claiming duplicate blocks...
> -Phase 5 - rebuild AG headers and trees...
> - - reset superblock...
> -Phase 6 - check inode connectivity...
> -reinitializing realtime summary inode
> - - resetting contents of realtime bitmap and summary inodes
> - - traversing filesystem ...
> - - traversal finished ...
> - - moving disconnected inodes to lost+found ...
> -Phase 7 - verify and correct link counts...
> -done
>
next prev parent reply other threads:[~2019-04-20 8:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 17:01 [PATCH] xfs/033: don't use repair output in golden output Eric Sandeen
2019-04-20 8:53 ` Eryu Guan [this message]
2019-04-22 13:22 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190420085332.GC22372@desktop \
--to=guaneryu@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=sandeen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.