All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs/033: don't use repair output in golden output
@ 2019-04-18 17:01 Eric Sandeen
  2019-04-20  8:53 ` Eryu Guan
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2019-04-18 17:01 UTC (permalink / raw)
  To: fstests

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
 
 	# 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs/033: don't use repair output in golden output
  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
  2019-04-22 13:22   ` Eric Sandeen
  0 siblings, 1 reply; 3+ messages in thread
From: Eryu Guan @ 2019-04-20  8:53 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: fstests

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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs/033: don't use repair output in golden output
  2019-04-20  8:53 ` Eryu Guan
@ 2019-04-22 13:22   ` Eric Sandeen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2019-04-22 13:22 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

On 4/20/19 3:53 AM, Eryu Guan wrote:
> 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)

Whoops sorry, I should have caught that.

Thanks,
-Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-22 13:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-04-22 13:22   ` Eric Sandeen

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.