public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: fstests <fstests@vger.kernel.org>
Subject: [PATCH] xfs/010: explicitly allow corrupted write in xfs_db
Date: Mon, 9 Jan 2017 10:49:21 -0600	[thread overview]
Message-ID: <9d52a01a-78db-3ee1-66e7-bddd1f3f9598@redhat.com> (raw)

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


             reply	other threads:[~2017-01-09 16:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 16:49 Eric Sandeen [this message]
2017-01-09 17:04 ` [PATCH] xfs/010: explicitly allow corrupted write in xfs_db Brian Foster

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=9d52a01a-78db-3ee1-66e7-bddd1f3f9598@redhat.com \
    --to=sandeen@redhat.com \
    --cc=fstests@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox