From patchwork Tue Apr 14 09:01:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 6214211 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3BF8A9F2EC for ; Tue, 14 Apr 2015 09:01:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 70872201EC for ; Tue, 14 Apr 2015 09:01:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A90E20145 for ; Tue, 14 Apr 2015 09:01:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752479AbbDNJBL (ORCPT ); Tue, 14 Apr 2015 05:01:11 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:44262 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752464AbbDNJBJ (ORCPT ); Tue, 14 Apr 2015 05:01:09 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t3E918o6027549 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Apr 2015 09:01:08 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t3E9178J032535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 14 Apr 2015 09:01:08 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t3E917ij001002; Tue, 14 Apr 2015 09:01:07 GMT Received: from localhost.jp.oracle.com (/10.191.2.213) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 14 Apr 2015 02:01:07 -0700 From: Liu Bo To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org Subject: [PATCH] xfstests: make "BTRFS_UTIL_PROG filesystem defragment" work Date: Tue, 14 Apr 2015 17:01:00 +0800 Message-Id: <1429002060-16597-1-git-send-email-bo.li.liu@oracle.com> X-Mailer: git-send-email 1.8.1.4 X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP _require_defrag() needs to check if the command is executable, but btrfs has its subcommand "filesystem defragment", which makes this checking fail. This workarounds it and now we can run case generic/324, generic/018, btrfs/005. Signed-off-by: Liu Bo --- common/defrag | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/defrag b/common/defrag index f923dc0..f36a68b 100644 --- a/common/defrag +++ b/common/defrag @@ -37,7 +37,11 @@ _require_defrag() ;; esac - _require_command "$DEFRAG_PROG" defragment + if [ "$FSTYP" == "btrfs" ]; then + _require_command "$BTRFS_UTIL_PROG" defragment + else + _require_command "$DEFRAG_PROG" defragment + fi _require_xfs_io_command "fiemap" }