From patchwork Sat Oct 28 17:08:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10031069 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 736EB60249 for ; Sat, 28 Oct 2017 17:09:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A69F283B0 for ; Sat, 28 Oct 2017 17:09:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4BA8B28794; Sat, 28 Oct 2017 17:09:03 +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, UNPARSEABLE_RELAY 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 148CC283B0 for ; Sat, 28 Oct 2017 17:09:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751324AbdJ1RJB (ORCPT ); Sat, 28 Oct 2017 13:09:01 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:35691 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbdJ1RJB (ORCPT ); Sat, 28 Oct 2017 13:09:01 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9SH8vHR006195 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 28 Oct 2017 17:08:58 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9SH8vmI005720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 28 Oct 2017 17:08:57 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v9SH8vCA026622; Sat, 28 Oct 2017 17:08:57 GMT Received: from localhost (/73.25.142.12) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 28 Oct 2017 10:08:56 -0700 Date: Sat, 28 Oct 2017 10:08:56 -0700 From: "Darrick J. Wong" To: eguan@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH v3 9/6] generic/459: fix test running errors Message-ID: <20171028170856.GB4911@magnolia> References: <150899709935.18389.17266737014565285073.stgit@magnolia> <20171027004446.GG5486@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171027004446.GG5486@magnolia> User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the DISCARD of the thin device somehow fails with this message: device-mapper: thin: Data device (dm-1) discard unsupported: Disabling discard passdown. Then we can end up with arbitrary gunk in the thin device. This causes mkfs to fail because it's afraid to format the device. Don't be afraid, just zap it. FWIW mkfs.xfs thinks that the thinp device has an xfs external log because sometimes the thinp device just happen to be backed by the log of the previous test's scratch fs. Fix this by making the _mkfs_dev helper always format the device, per Eryu Guan's suggestion. Signed-off-by: Darrick J. Wong --- common/rc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 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/common/rc b/common/rc index 7e453e0..c441199 100644 --- a/common/rc +++ b/common/rc @@ -642,7 +642,10 @@ _mkfs_dev() $MKFS_PROG -t $FSTYP -- -F $MKFS_OPTIONS $* \ 2>$tmp.mkfserr 1>$tmp.mkfsstd ;; - + xfs) + yes | $MKFS_PROG -t $FSTYP -- -f $MKFS_OPTIONS $* \ + 2>$tmp.mkfserr 1>$tmp.mkfsstd + ;; *) yes | $MKFS_PROG -t $FSTYP -- $MKFS_OPTIONS $* \ 2>$tmp.mkfserr 1>$tmp.mkfsstd