From patchwork Tue Feb 20 05:34:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Misono Tomohiro X-Patchwork-Id: 10229429 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 44E8F60392 for ; Tue, 20 Feb 2018 05:40:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2980E283BB for ; Tue, 20 Feb 2018 05:40:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D460283C3; Tue, 20 Feb 2018 05:40:01 +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 E512F283BB for ; Tue, 20 Feb 2018 05:39:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750737AbeBTFfq (ORCPT ); Tue, 20 Feb 2018 00:35:46 -0500 Received: from mgwkm02.jp.fujitsu.com ([202.219.69.169]:14099 "EHLO mgwkm02.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750704AbeBTFfp (ORCPT ); Tue, 20 Feb 2018 00:35:45 -0500 Received: from kw-mxoi2.gw.nic.fujitsu.com (unknown [192.168.231.133]) by mgwkm02.jp.fujitsu.com with smtp id 43da_9f76_f78f7ac6_548f_4bdc_8150_9e14e0875995; Tue, 20 Feb 2018 14:35:42 +0900 Received: from g01jpfmpwkw01.exch.g01.fujitsu.local (g01jpfmpwkw01.exch.g01.fujitsu.local [10.0.193.38]) by kw-mxoi2.gw.nic.fujitsu.com (Postfix) with ESMTP id 76FC3AC00C0; Tue, 20 Feb 2018 14:35:41 +0900 (JST) Received: from g01jpexchkw33.g01.fujitsu.local (unknown [10.0.193.4]) by g01jpfmpwkw01.exch.g01.fujitsu.local (Postfix) with ESMTP id C1DA6692401; Tue, 20 Feb 2018 14:35:40 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.5.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20170217-enc X-SHieldMailCheckerMailID: 097b24c64125407fa7e6c3d01fc7fe68 To: CC: , linux-btrfs From: "Misono, Tomohiro" Subject: [PATCH] btrfs/150: add _scratch_dev_pool_get/put to run the test as expected Message-ID: <80c576ca-2ca0-ff83-cd9e-9622e2ce28ce@jp.fujitsu.com> Date: Tue, 20 Feb 2018 14:34:32 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-US X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-MML: disable 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 btrfs/150 uses RAID1 profile and make SCRATCH_DEV fail for test. However, if SCRATCH_DEV_POOL consists more than two devices, SCRATCH_DEV may not be used for RAID1 pair and the tests may not run as expected. Fix this by add _scratch_dev_pool_get/put like other tests (141, 143 etc.) do. Signed-off-by: Tomohiro Misono Reviewed-by: Qu Wenruo --- tests/btrfs/150 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/btrfs/150 b/tests/btrfs/150 index 97041b6c..1e4586be 100755 --- a/tests/btrfs/150 +++ b/tests/btrfs/150 @@ -55,6 +55,7 @@ _supported_os Linux _require_scratch _require_fail_make_request _require_scratch_dev_pool 2 +_scratch_dev_pool_get 2 SYSFS_BDEV=`_sysfs_dev $SCRATCH_DEV` enable_io_failure() @@ -100,6 +101,7 @@ while [[ -z $result ]]; do disable_io_failure done +_scratch_dev_pool_put # success, all done status=0 exit