From: Eric Sandeen Date: Mon, 9 Jan 2017 16:49:21 +0000 (-0600) Subject: xfs/010: explicitly allow corrupted write in xfs_db X-Git-Tag: v2022.05.01~2238 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9ef7c4e3dcc06f93a38d8919c949ca3a1e201a48;p=users%2Fhch%2Fxfstests-dev.git xfs/010: explicitly allow corrupted write in xfs_db 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 Reviewed-by: Brian Foster Signed-off-by: Eryu Guan --- diff --git a/tests/xfs/010 b/tests/xfs/010 index d350d6412..b9f28915d 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