From patchwork Tue Jan 16 20:10:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 10168115 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 2BC656055D for ; Tue, 16 Jan 2018 21:18:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C76222380 for ; Tue, 16 Jan 2018 21:18:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10C9D23E64; Tue, 16 Jan 2018 21:18:13 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 B7599223A0 for ; Tue, 16 Jan 2018 21:18:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750790AbeAPVSD (ORCPT ); Tue, 16 Jan 2018 16:18:03 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:53044 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796AbeAPVSC (ORCPT ); Tue, 16 Jan 2018 16:18:02 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0GLGlln016916; Tue, 16 Jan 2018 21:18:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2017-10-26; bh=H2NSmY9M3mA+E1B7cJZDKK/4OrrnYKlSOcp1QjhAnew=; b=MRx8ePIVcbYmwjUuMYp8R0xLux2AlC52+3eJ4r8LMCAI0HR2+T3Wkqn6WrsiZn68Kcsd aBFT1mklB/6iM7GttRuvwa5gUJjC+7d8QV4IFabRZvEWM8+YMGUghPxY4S4wAaP/5J0h ORFwMh55v33OL0bNMvRAdVzJlNIuZ3DBzdcnQ96ol12iomhYUuIg4yh5OM3xCuIPeiUD rkx40FQsAFRlMAqRPjYyYnIId/o6bhYx0zTRok/x48OsyQuihP2xORbZtHehMjz9NFMQ ZTM6n6SIdbKnzy1dwhDCaFs/X1IIlyD1dHCYUTAlodJP+MI2x8f6TQq++bpYp80NOqwJ mw== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2fhqywrba7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Jan 2018 21:18:01 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w0GLD0lS012678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 16 Jan 2018 21:13:00 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 w0GLD0oA003725; Tue, 16 Jan 2018 21:13:00 GMT Received: from dhcp-10-211-47-181.usdhcp.oraclecorp.com.com (/10.211.47.181) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 16 Jan 2018 13:12:59 -0800 From: Liu Bo To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org Subject: [PATCH] Fstests: btrfs/027 unmount scratch device if test fails Date: Tue, 16 Jan 2018 13:10:18 -0700 Message-Id: <20180116201018.2008-2-bo.li.liu@oracle.com> X-Mailer: git-send-email 2.9.4 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8776 signatures=668653 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=5 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=783 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801160292 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This test, btrfs/027, runs tests against different raid profiles in a loop, if one of them aborts, it also fails the following ones with errors like, Test -m raid10 -d raid10 ERROR: /dev/xxx is mounted Test -m raid5 -d raid5 ERROR: /dev/xxx is mounted Test -m raid6 -d raid6 ERROR: /dev/xxx is mounted _scratch_unmount is added to avoid the above. Signed-off-by: Liu Bo --- tests/btrfs/027 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/btrfs/027 b/tests/btrfs/027 index 625a27f..689cd4c 100755 --- a/tests/btrfs/027 +++ b/tests/btrfs/027 @@ -95,6 +95,7 @@ run_test() $SCRATCH_MNT >>$seqres.full 2>&1 if [ $? -ne 0 ]; then echo "btrfs replace failed" + _scratch_unmount _spare_dev_put _scratch_dev_pool_put return @@ -102,6 +103,7 @@ run_test() $BTRFS_UTIL_PROG scrub start -B $SCRATCH_MNT >>$seqres.full 2>&1 if [ $? -ne 0 ]; then echo "btrfs scrub failed" + _scratch_unmount _spare_dev_put _scratch_dev_pool_put return