From patchwork Wed Mar 20 00:45:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10860647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B69671515 for ; Wed, 20 Mar 2019 00:45:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 914B529987 for ; Wed, 20 Mar 2019 00:45:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 859502998E; Wed, 20 Mar 2019 00:45:59 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 23AD429987 for ; Wed, 20 Mar 2019 00:45:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727068AbfCTAp6 (ORCPT ); Tue, 19 Mar 2019 20:45:58 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:52562 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfCTAp6 (ORCPT ); Tue, 19 Mar 2019 20:45:58 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2K0dnD6169036; Wed, 20 Mar 2019 00:45:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=rsaDHcnJKIscsGVxTpFZ+GKz6trYQ9D60X4wPZjsctU=; b=TBCzmOGBanidstHcQL5s2En3mZ+phy1M6LVpbVcUFb/0XmEpgcXeVRYyQYQGg6n9i9xR 6MBHeC4axR56Dth0AUfruIwKA/SYJk6z6hOgK62RM5LagQWRq6iBrkNsC4TQAzjBFxpV sCKtTdlPtf1RJNfxrbNuey7PNxHsmqUbHg5pRyNn2b7hJYKZ7k3KOQ2q9FDa9+PNg1qK y0P0UpYwhl0gf1J1alKjZORGiuzIwmBTDtFUvSSH8QM7QT2YDkm+EpvUySb+7HoCqctQ Ff3PufzIPQC2dO7ZLV04NIQV/jWLiZkjKzYJHzc5548fuJAsKZByfSyXwX8q9Qq2G5b3 GA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2r8rjuqwy5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Mar 2019 00:45:56 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x2K0jtBE017202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Mar 2019 00:45:55 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x2K0jt0q004321; Wed, 20 Mar 2019 00:45:55 GMT Received: from localhost (/10.159.245.168) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 19 Mar 2019 17:45:55 -0700 Subject: [PATCH 11/12] check: wipe scratch devices between tests From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 19 Mar 2019 17:45:55 -0700 Message-ID: <155304275552.31707.6473598082840688691.stgit@magnolia> In-Reply-To: <155304267647.31707.14180452399822113095.stgit@magnolia> References: <155304267647.31707.14180452399822113095.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9200 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903200003 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Wipe the scratch devices in between each test to ensure that tests are formatting them and not making assumptions about previous contents. Signed-off-by: Darrick J. Wong --- check | 1 + common/rc | 6 ++++++ common/xfs | 1 + 3 files changed, 8 insertions(+) diff --git a/check b/check index a2c5ba21..bcf08dfe 100755 --- a/check +++ b/check @@ -737,6 +737,7 @@ for section in $HOST_OPTIONS_SECTIONS; do # _check_dmesg depends on this log in dmesg touch ${RESULT_DIR}/check_dmesg fi + _try_wipe_scratch_devs > /dev/null 2>&1 if [ "$DUMP_OUTPUT" = true ]; then ./$seq 2>&1 | tee $tmp.out # Because $? would get tee's return code diff --git a/common/rc b/common/rc index 1c42515f..40eef80f 100644 --- a/common/rc +++ b/common/rc @@ -3942,6 +3942,12 @@ _require_fibmap() rm -f $file } +_try_wipe_scratch_devs() +{ + _scratch_unmount + test -x "$WIPEFS_PROG" && $WIPEFS_PROG -a $SCRATCH_DEV_POOL $SCRATCH_DEV $SCRATCH_LOGDEV $SCRATCH_RTDEV +} + init_rc ################################################################################ diff --git a/common/xfs b/common/xfs index 24065813..af2b62ba 100644 --- a/common/xfs +++ b/common/xfs @@ -295,6 +295,7 @@ _require_xfs_db_command() fi command=$1 + _scratch_mkfs_xfs >/dev/null 2>&1 _scratch_xfs_db -x -c "help" | grep $command > /dev/null || \ _notrun "xfs_db $command support is missing" }