From patchwork Tue Jan 16 20:10:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 10168111 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 7BE9D603B5 for ; Tue, 16 Jan 2018 21:18:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C28422380 for ; Tue, 16 Jan 2018 21:18:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6097122B39; Tue, 16 Jan 2018 21:18:05 +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 1669222380 for ; Tue, 16 Jan 2018 21:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750830AbeAPVSC (ORCPT ); Tue, 16 Jan 2018 16:18:02 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:54682 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbeAPVSB (ORCPT ); Tue, 16 Jan 2018 16:18:01 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0GLGomF057431; 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=G8uGM8krFpRaTwjSw/mWY/MQ8XiesfDoXzLj50Bvhr8=; b=e6WMIVXf05rzGiAMHJQTb93H0QwwmF+aNo2lYo698Fo1PTLQJMw5YRy4GL/A8wpfZejl E/jb/KAQh0105+v7euc4e+4hqjwsD6pTLNhveeJPGaKn7tG3pBbysawqa40Nxnz8bsWb BMHgUj5DxMM8BJ5iQ//vXrJau/pObhKmuX+mwRqjZvwsTKalLHB66wLTgc7lx4zMD68U uD+xqZ3Q59aeHtxcKQY/HqQnpoKL616+/Bx17hJyIm/e3lzFB4ltDq0XSktbelk79gCm 8LL0DVe43jQOQMJ82CKNyF/7u8UFQq84/SdBzi5pFdI0b8Tgn+HUMwJsw9vXGAoTdmVE gA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2fhr4fg95p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Jan 2018 21:18:01 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w0GLCxvA026523 (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 aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w0GLCxEI017843; Tue, 16 Jan 2018 21:12:59 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/011 fix device mounted when tests aborts Date: Tue, 16 Jan 2018 13:10:17 -0700 Message-Id: <20180116201018.2008-1-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=366 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801160292 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP One of btrfs tests, btrfs/011, uses SCRATCH_DEV_POOL and puts a non-SCRATCH_DEV device as the first one when doing mkfs, and this makes _require_scratch{_nocheck} confused since it checks mount point with SCRATCH_DEV only. This adds _scratch_umount to cleanup() to umount SCRATCH_MNT by 011 itself. Signed-off-by: Liu Bo Reviewed-by: Anand Jain Tested-by: Anand Jain --- tests/btrfs/011 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/btrfs/011 b/tests/btrfs/011 index 28f1388..f4c5309 100755 --- a/tests/btrfs/011 +++ b/tests/btrfs/011 @@ -51,6 +51,7 @@ _cleanup() fi wait rm -f $tmp.tmp + _scratch_unmount > /dev/null 2>&1 } trap "_cleanup; exit \$status" 0 1 2 3 15