From patchwork Tue Feb 3 23:07:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaegeuk Kim X-Patchwork-Id: 5772091 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 35A419F2ED for ; Tue, 3 Feb 2015 23:07:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 65F9C202B8 for ; Tue, 3 Feb 2015 23:07:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83318202A1 for ; Tue, 3 Feb 2015 23:07:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753709AbbBCXHh (ORCPT ); Tue, 3 Feb 2015 18:07:37 -0500 Received: from mail.kernel.org ([198.145.29.136]:56429 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743AbbBCXHg (ORCPT ); Tue, 3 Feb 2015 18:07:36 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E0EFA202BE; Tue, 3 Feb 2015 23:07:35 +0000 (UTC) Received: from localhost (unknown [166.170.42.158]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 074F5200E1; Tue, 3 Feb 2015 23:07:34 +0000 (UTC) From: Jaegeuk Kim To: Dave Chinner Cc: fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Jaegeuk Kim Subject: [PATCH 2/8 v4] common/rc: add _require_bmap Date: Tue, 3 Feb 2015 15:07:14 -0800 Message-Id: <1423004840-45315-3-git-send-email-jaegeuk@kernel.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1423004840-45315-1-git-send-email-jaegeuk@kernel.org> References: <1423004840-45315-1-git-send-email-jaegeuk@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=ham 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 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is to detect whether the filesystem tool supports bmap or not. Signed-off-by: Jaegeuk Kim --- common/config | 2 ++ common/rc | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/common/config b/common/config index 235f4a1..9fb3703 100644 --- a/common/config +++ b/common/config @@ -168,6 +168,7 @@ if [ -n "$__XFSDUMP_PROG" ]; then else export XFSDUMP_PROG="" fi +export BMAP_XFS_PROG="`set_prog_path xfs_bmap`" export XFSRESTORE_PROG="`set_prog_path xfsrestore`" export XFSINVUTIL_PROG="`set_prog_path xfsinvutil`" export GETFATTR_PROG="`set_prog_path getfattr`" @@ -220,6 +221,7 @@ case "$HOSTOS" in export MKFS_UDF_PROG="`set_prog_path mkudffs`" export MKFS_BTRFS_PROG="`set_btrfs_mkfs_prog_path_with_opts`" export MKFS_F2FS_PROG="`set_prog_path mkfs.f2fs`" + export BMAP_F2FS_PROG="`set_prog_path fibmap.f2fs`" export BTRFS_UTIL_PROG="`set_prog_path btrfs`" export BTRFS_SHOW_SUPER_PROG="`set_prog_path btrfs-show-super`" export XFS_FSR_PROG="`set_prog_path xfs_fsr`" diff --git a/common/rc b/common/rc index 438cd51..d413721 100644 --- a/common/rc +++ b/common/rc @@ -2331,6 +2331,24 @@ _require_scratch_shutdown() _scratch_unmount } +# Does bmap work on this fs? +_require_bmap() +{ + case "$FSTYP" in + xfs) + _require_command $BMAP_XFS_PROG + export BMAP_PROG=$BMAP_XFS_PROG + ;; + f2fs) + _require_command $BMAP_F2FS_PROG + export BMAP_PROG=$BMAP_F2FS_PROG + ;; + *) + _notrun "$FSTYP does not support bmap" + ;; + esac +} + # arg 1 is dev to remove and is output of the below eg. # ls -l /sys/class/block/sdd | rev | cut -d "/" -f 3 | rev _devmgt_remove()