From patchwork Fri Sep 1 05:41:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Misono Tomohiro X-Patchwork-Id: 9933485 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 6E5486021C for ; Fri, 1 Sep 2017 05:42:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6044C27BFF for ; Fri, 1 Sep 2017 05:42:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54D6A28515; Fri, 1 Sep 2017 05:42: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=unavailable 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 F1E1D28517 for ; Fri, 1 Sep 2017 05:41:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751317AbdIAFl0 (ORCPT ); Fri, 1 Sep 2017 01:41:26 -0400 Received: from mgwkm03.jp.fujitsu.com ([202.219.69.170]:48868 "EHLO mgwkm03.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751285AbdIAFlZ (ORCPT ); Fri, 1 Sep 2017 01:41:25 -0400 Received: from kw-mxq.gw.nic.fujitsu.com (unknown [192.168.231.130]) by mgwkm03.jp.fujitsu.com with smtp id 4603_0b09_b8b6433a_28f8_4529_afc4_e8c39c8c48fe; Fri, 01 Sep 2017 14:41:19 +0900 Received: from g01jpfmpwkw01.exch.g01.fujitsu.local (g01jpfmpwkw01.exch.g01.fujitsu.local [10.0.193.38]) by kw-mxq.gw.nic.fujitsu.com (Postfix) with ESMTP id D7E67AC013D; Fri, 1 Sep 2017 14:41:19 +0900 (JST) Received: from G01JPEXCHKW14.g01.fujitsu.local (G01JPEXCHKW14.g01.fujitsu.local [10.0.194.53]) by g01jpfmpwkw01.exch.g01.fujitsu.local (Postfix) with ESMTP id F0AB069276B; Fri, 1 Sep 2017 14:41:18 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.5.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20170217-enc X-SHieldMailCheckerMailID: 261b5da879d442d487153231257e569a Subject: [PATCH 2/2] Use common filter function in several tests From: "Misono, Tomohiro" To: , Eryu Guan CC: References: <5f6cd84d-6e12-2b23-09fc-c0f744d1d2f2@jp.fujitsu.com> Message-ID: Date: Fri, 1 Sep 2017 14:41:14 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <5f6cd84d-6e12-2b23-09fc-c0f744d1d2f2@jp.fujitsu.com> Content-Language: en-US X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-MML: disable Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use newly introduced common function to filter both $TEST_DIR and $SCRATCH_MNT. Signed-off-by: Tomohiro Misono --- common/filter | 2 +- tests/btrfs/029 | 11 +++-------- tests/generic/409 | 3 +-- tests/generic/410 | 3 +-- tests/generic/411 | 3 +-- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/common/filter b/common/filter index 75570f9..5d50f61 100644 --- a/common/filter +++ b/common/filter @@ -322,7 +322,7 @@ _filter_quota() { # Long dev name might be split onto its own line; last # seds remove that newline if present - _filter_scratch | _filter_test_dir | _filter_spaces | \ + _filter_testdir_and_scratch | _filter_spaces | \ sed -e 'N;s/SCRATCH_DEV\n/SCRATCH_DEV/g' | \ sed -e 'N;s/TEST_DEV\n/TEST_DEV/g' } diff --git a/tests/btrfs/029 b/tests/btrfs/029 index c390c95..b6e2dbb 100755 --- a/tests/btrfs/029 +++ b/tests/btrfs/029 @@ -66,19 +66,14 @@ _scratch_mkfs > /dev/null 2>&1 _scratch_mount $XFS_IO_PROG -f -c 'pwrite -S 0x61 0 9000' $SCRATCH_MNT/original >> $seqres.full -_filter_testdirs() -{ - _filter_test_dir | _filter_scratch -} - _create_reflinks() { # auto reflink, should fall back to non-reflink rm -rf $2 echo "reflink=auto:" cp --reflink=auto $1 $2 - md5sum $1 | _filter_testdirs - md5sum $2 | _filter_testdirs + md5sum $1 | _filter_testdir_and_scratch + md5sum $2 | _filter_testdir_and_scratch # always reflink, should fail outright rm -rf $2 @@ -86,7 +81,7 @@ _create_reflinks() cp --reflink=always $1 $2 >> $seqres.full 2>&1 || echo "cp reflink failed" # The failed target actually gets created by cp: - ls $2 | _filter_testdirs + ls $2 | _filter_testdir_and_scratch } echo "test reflinks across different devices" diff --git a/tests/generic/409 b/tests/generic/409 index 22af44c..3ad65c9 100755 --- a/tests/generic/409 +++ b/tests/generic/409 @@ -104,8 +104,7 @@ find_mnt() -e "s;$mpB;mpB;g" \ -e "s;$mpC;mpC;g" \ -e "s;$mpD;mpD;g" | \ - _filter_spaces | _filter_scratch | \ - _filter_test_dir | sort + _filter_spaces | _filter_testdir_and_scratch | sort echo "======" } diff --git a/tests/generic/410 b/tests/generic/410 index 18cb0c1..63ab716 100755 --- a/tests/generic/410 +++ b/tests/generic/410 @@ -110,8 +110,7 @@ find_mnt() sed -e "s;$mpA;mpA;g" \ -e "s;$mpB;mpB;g" \ -e "s;$mpC;mpC;g" | \ - _filter_spaces | _filter_scratch | \ - _filter_test_dir | sort + _filter_spaces | _filter_testdir_and_scratch | sort echo "======" } diff --git a/tests/generic/411 b/tests/generic/411 index 5db49a4..83f6d26 100755 --- a/tests/generic/411 +++ b/tests/generic/411 @@ -93,8 +93,7 @@ find_mnt() sed -e "s;$mpA;mpA;g" \ -e "s;$mpB;mpB;g" \ -e "s;$mpC;mpC;g" | \ - _filter_spaces | _filter_scratch | \ - _filter_test_dir | sort + _filter_spaces | _filter_testdir_and_scratch | sort echo "======" }