From patchwork Tue Mar 11 06:59:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Darrick Wong X-Patchwork-Id: 328980 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 459C12C007E for ; Tue, 11 Mar 2014 17:59:15 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753438AbaCKG7O (ORCPT ); Tue, 11 Mar 2014 02:59:14 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:22853 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752793AbaCKG7N (ORCPT ); Tue, 11 Mar 2014 02:59:13 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s2B6xBAY005730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 11 Mar 2014 06:59:12 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s2B6xBpb020729 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 11 Mar 2014 06:59:11 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s2B6xABw007536; Tue, 11 Mar 2014 06:59:10 GMT Received: from localhost (/67.160.151.179) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Mar 2014 23:59:10 -0700 Subject: [PATCH 48/49] tests: enable using fuse2fs with metadata checksum test To: tytso@mit.edu, darrick.wong@oracle.com From: "Darrick J. Wong" Cc: linux-ext4@vger.kernel.org Date: Mon, 10 Mar 2014 23:59:09 -0700 Message-ID: <20140311065909.30585.47725.stgit@birch.djwong.org> In-Reply-To: <20140311065356.30585.47192.stgit@birch.djwong.org> References: <20140311065356.30585.47192.stgit@birch.djwong.org> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Create custom mount/umount commands so that we can run the metadata checksumming tests against fuse2fs. Signed-off-by: Darrick J. Wong --- tests/fuse2fs/mount | 28 ++++++++++++++++++++++++++++ tests/fuse2fs/umount | 21 +++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100755 tests/fuse2fs/mount create mode 100755 tests/fuse2fs/umount -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tests/fuse2fs/mount b/tests/fuse2fs/mount new file mode 100755 index 0000000..321b1f5 --- /dev/null +++ b/tests/fuse2fs/mount @@ -0,0 +1,28 @@ +#!/bin/bash + +# Mount ext4 via fuse. Put tests/fuse2fs/ at the start of PATH if you want +# to run the metadata checksumming tests with fuse2fs. + +for arg in "$@"; do + if [ -b "${arg}" ]; then + DEV="${arg}" + elif [ -d "${arg}" ]; then + MNT="${arg}" + fi +done + +if [ -z "${DEV}" -o -z "${MNT}" ]; then + echo "Please specify a device and a mountpoint." +fi + +DIR="$(readlink -f "$(dirname "$0")")" +if [ -n "${FUSE2FS_DEBUG}" ]; then + "${DIR}/../../misc/fuse2fs" "${DEV}" "${MNT}" -d >> "${FUSE2FS_DEBUG}" 2>&1 & + sleep 1 + exit 0 +else + "${DIR}/../../misc/fuse2fs" "${DEV}" "${MNT}" + ERR=$? + sleep 1 + exit "${ERR}" +fi diff --git a/tests/fuse2fs/umount b/tests/fuse2fs/umount new file mode 100755 index 0000000..b21ee5a --- /dev/null +++ b/tests/fuse2fs/umount @@ -0,0 +1,21 @@ +#!/bin/bash + +# unmount a filesystem +sync +sync +sync + +sleep 2 +if [ -x /bin/umount ]; then + /bin/umount "$@" + ERR=$? +elif [ -x /sbin/umount ]; then + /sbin/umount "$@" + ERR=$? +else + echo "Where is umount?" + exit 5 +fi +sleep 1 + +exit "${ERR}"