From patchwork Thu Apr 18 17:01:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 10907739 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 114E617E0 for ; Thu, 18 Apr 2019 17:01:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5A3328D9A for ; Thu, 18 Apr 2019 17:01:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3B0628D8C; Thu, 18 Apr 2019 17:01:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,HEXHASH_WORD, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 788E228CB5 for ; Thu, 18 Apr 2019 17:01:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388299AbfDRRBf (ORCPT ); Thu, 18 Apr 2019 13:01:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42124 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733192AbfDRRBf (ORCPT ); Thu, 18 Apr 2019 13:01:35 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4F7783008CCC for ; Thu, 18 Apr 2019 17:01:34 +0000 (UTC) Received: from [IPv6:::1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3D58660BE5 for ; Thu, 18 Apr 2019 17:01:32 +0000 (UTC) To: fstests From: Eric Sandeen Subject: [PATCH] xfs/033: don't use repair output in golden output Message-ID: <8b214be1-6f7e-f668-39ef-2e188f44d352@redhat.com> Date: Thu, 18 Apr 2019 12:01:31 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 18 Apr 2019 17:01:34 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 # 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 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 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 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 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 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 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 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 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 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 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 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 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