From patchwork Mon Jan 9 16:49:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 9505525 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 91F9D606E1 for ; Mon, 9 Jan 2017 16:49:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B3242847F for ; Mon, 9 Jan 2017 16:49:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7029B2849A; Mon, 9 Jan 2017 16:49:26 +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,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 313B62847F for ; Mon, 9 Jan 2017 16:49:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761296AbdAIQtY (ORCPT ); Mon, 9 Jan 2017 11:49:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34944 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756899AbdAIQtW (ORCPT ); Mon, 9 Jan 2017 11:49:22 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9167FA4669 for ; Mon, 9 Jan 2017 16:49:23 +0000 (UTC) Received: from [IPv6:::1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v09GnMAp004796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 9 Jan 2017 11:49:23 -0500 To: fstests From: Eric Sandeen Subject: [PATCH] xfs/010: explicitly allow corrupted write in xfs_db Message-ID: <9d52a01a-78db-3ee1-66e7-bddd1f3f9598@redhat.com> Date: Mon, 9 Jan 2017 10:49:21 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 09 Jan 2017 16:49:23 +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 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 --- -- 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 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