All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs/010: explicitly allow corrupted write in xfs_db
@ 2017-01-09 16:49 Eric Sandeen
  2017-01-09 17:04 ` Brian Foster
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2017-01-09 16:49 UTC (permalink / raw)
  To: fstests

xfs/010 wants to write corruption and test how xfs_repair
deals, but when:

  xfs: forbid AG btrees with level == 0

is merged to userspace, this new test fails the write verifier
in xfs_db.

Add "-c" to allow the corrupted write, do the corruptions all
in one xfs_db command (so it doesn't have to re-read the
corrupted data on 2nd startup), and filter out the

  "Allowing write of corrupted data and bad CRC"

output from the "write -c" command.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/tests/xfs/010 b/tests/xfs/010
index d350d64..471ec2c 100755
--- a/tests/xfs/010
+++ b/tests/xfs/010
@@ -95,8 +95,11 @@ _corrupt_finobt_root()
 	dev=$1
 
 	# nuke the agi finobt root fields
-	$XFS_DB_PROG -x -c "agi 0" -c "write free_root 0" $dev
-	$XFS_DB_PROG -x -c "agi 0" -c "write free_level 0" $dev
+	$XFS_DB_PROG -x				\
+		-c "agi 0"			\
+		-c "write -c free_root 0"	\
+		-c "write -c free_level 0"	\
+		$dev | grep -v "Allowing write of corrupted"
 }
 
 # real QA test starts here


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

* Re: [PATCH] xfs/010: explicitly allow corrupted write in xfs_db
  2017-01-09 16:49 [PATCH] xfs/010: explicitly allow corrupted write in xfs_db Eric Sandeen
@ 2017-01-09 17:04 ` Brian Foster
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Foster @ 2017-01-09 17:04 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: fstests

On Mon, Jan 09, 2017 at 10:49:21AM -0600, Eric Sandeen wrote:
> xfs/010 wants to write corruption and test how xfs_repair
> deals, but when:
> 
>   xfs: forbid AG btrees with level == 0
> 
> is merged to userspace, this new test fails the write verifier
> in xfs_db.
> 
> Add "-c" to allow the corrupted write, do the corruptions all
> in one xfs_db command (so it doesn't have to re-read the
> corrupted data on 2nd startup), and filter out the
> 
>   "Allowing write of corrupted data and bad CRC"
> 
> output from the "write -c" command.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

> 
> diff --git a/tests/xfs/010 b/tests/xfs/010
> index d350d64..471ec2c 100755
> --- a/tests/xfs/010
> +++ b/tests/xfs/010
> @@ -95,8 +95,11 @@ _corrupt_finobt_root()
>  	dev=$1
>  
>  	# nuke the agi finobt root fields
> -	$XFS_DB_PROG -x -c "agi 0" -c "write free_root 0" $dev
> -	$XFS_DB_PROG -x -c "agi 0" -c "write free_level 0" $dev
> +	$XFS_DB_PROG -x				\
> +		-c "agi 0"			\
> +		-c "write -c free_root 0"	\
> +		-c "write -c free_level 0"	\
> +		$dev | grep -v "Allowing write of corrupted"
>  }
>  
>  # real QA test starts here
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-01-09 17:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-09 16:49 [PATCH] xfs/010: explicitly allow corrupted write in xfs_db Eric Sandeen
2017-01-09 17:04 ` Brian Foster

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.