From patchwork Fri Apr 21 10:10:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 9692355 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 4149860328 for ; Fri, 21 Apr 2017 10:10:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35D2628607 for ; Fri, 21 Apr 2017 10:10:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2932B2861C; Fri, 21 Apr 2017 10:10:56 +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 709AB28607 for ; Fri, 21 Apr 2017 10:10:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1037621AbdDUKKx (ORCPT ); Fri, 21 Apr 2017 06:10:53 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:64519 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1037683AbdDUKKw (ORCPT ); Fri, 21 Apr 2017 06:10:52 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="18016535" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 21 Apr 2017 18:10:48 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 7276347E64BB; Fri, 21 Apr 2017 18:10:46 +0800 (CST) Received: from localhost.localdomain (10.167.220.81) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 21 Apr 2017 18:10:46 +0800 From: Xiao Yang To: CC: , Xiao Yang Subject: [PATCH 2/2] btrfs: use $FILEFRAG_PROG instead of filefrag Date: Fri, 21 Apr 2017 18:10:40 +0800 Message-ID: <1492769440-12413-2-git-send-email-yangx.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1492769440-12413-1-git-send-email-yangx.jy@cn.fujitsu.com> References: <1492769440-12413-1-git-send-email-yangx.jy@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.220.81] X-yoursite-MailScanner-ID: 7276347E64BB.A9841 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@cn.fujitsu.com Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP $FILEFRAG_PROG has been defined in common/config, so we could apply it. Signed-off-by: Xiao Yang --- tests/btrfs/004 | 4 ++-- tests/btrfs/079 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/btrfs/004 b/tests/btrfs/004 index 3f8330f..1b5b124 100755 --- a/tests/btrfs/004 +++ b/tests/btrfs/004 @@ -53,7 +53,7 @@ _require_scratch _require_no_large_scratch_dev _require_btrfs_command inspect-internal logical-resolve _require_btrfs_command inspect-internal inode-resolve -_require_command "/usr/sbin/filefrag" filefrag +_require_command "$FILEFRAG_PROG" filefrag rm -f $seqres.full @@ -82,7 +82,7 @@ _filter_extents() _check_file_extents() { - cmd="filefrag -v $1" + cmd="$FILEFRAG_PROG -v $1" echo "# $cmd" >> $seqres.full out=`$cmd | _filter_extents` if [ -z "$out" ]; then diff --git a/tests/btrfs/079 b/tests/btrfs/079 index ed4eb72..560d5ec 100755 --- a/tests/btrfs/079 +++ b/tests/btrfs/079 @@ -60,7 +60,7 @@ _supported_os Linux _require_scratch # Since xfs_io's fiemap always use SYNC flag and can't be unset, # we must use filefrag to call fiemap without SYNC flag. -_require_command "/usr/sbin/filefrag" filefrag +_require_command "$FILEFRAG_PROG" filefrag _require_xfs_io_command "falloc" filesize=$((10 * 1024 * 1024 * 1024)) #10G size @@ -95,7 +95,7 @@ _filter_error() { fiemap_work() { filename=$1 while true; do - filefrag $filename 2> $tmp.output 1> /dev/null + $FILEFRAG_PROG $filename 2> $tmp.output 1> /dev/null ret=$? err=`cat $tmp.output | _filter_error` if [ $ret -ne 0 -o -n "$err" ]; then