From patchwork Tue Jun 30 04:15:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 6693151 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 04D59C05AC for ; Tue, 30 Jun 2015 04:31:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 482362060A for ; Tue, 30 Jun 2015 04:31:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 538F8204A0 for ; Tue, 30 Jun 2015 04:31:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753606AbbF3E1O (ORCPT ); Tue, 30 Jun 2015 00:27:14 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:35765 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750733AbbF3EPu (ORCPT ); Tue, 30 Jun 2015 00:15:50 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t5U4FhM9016223 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Jun 2015 04:15:43 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t5U4FhhA004402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 30 Jun 2015 04:15:43 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t5U4Fh61004147; Tue, 30 Jun 2015 04:15:43 GMT Received: from localhost (/24.21.154.84) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 29 Jun 2015 21:15:42 -0700 Subject: [PATCH 03/11] generic/32[6-8]: support xfs in addition to btrfs From: "Darrick J. Wong" To: david@fromorbit.com, darrick.wong@oracle.com Cc: linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, fstests@vger.kernel.org, xfs@oss.sgi.com Date: Mon, 29 Jun 2015 21:15:41 -0700 Message-ID: <20150630041541.2476.49356.stgit@birch.djwong.org> In-Reply-To: <20150630041519.2476.23059.stgit@birch.djwong.org> References: <20150630041519.2476.23059.stgit@birch.djwong.org> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Modify the reflink tests to support xfs. Signed-off-by: Darrick J. Wong --- common/rc | 37 +++++++++++++++++++++++++++++++++++++ tests/generic/800 | 2 +- tests/generic/801 | 2 +- tests/generic/802 | 2 +- 4 files changed, 40 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" 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/common/rc b/common/rc index 51d2fcb..8f20dc8 100644 --- a/common/rc +++ b/common/rc @@ -1397,6 +1397,43 @@ _require_xfs_crc() umount $SCRATCH_MNT } +# this test requires the test fs support reflink... +# +_require_test_reflink() +{ + case $FSTYP in + xfs) + xfs_info "${TEST_DIR}" | grep reflink=1 -c -q || _notrun "Reflink not supported by this filesystem type: $FSTYP" + ;; + btrfs) + true + ;; + *) + _notrun "Reflink not supported by this filesystem type: $FSTYP" + ;; + esac +} + +# this test requires the scratch fs support reflink... +# +_require_scratch_reflink() +{ + case $FSTYP in + xfs) + _scratch_mkfs > /dev/null 2>&1 + _scratch_mount + xfs_info "${TEST_DIR}" | grep reflink=1 -c -q || _notrun "$FSTYP does not support reflink" + _scratch_unmount + ;; + btrfs) + true + ;; + *) + _notrun "Reflink not supported by this filesystem type: $FSTYP" + ;; + esac +} + # this test requires the bigalloc feature to be available in mkfs.ext4 # _require_ext4_mkfs_bigalloc() diff --git a/tests/generic/800 b/tests/generic/800 index a71f11a..954f39d 100755 --- a/tests/generic/800 +++ b/tests/generic/800 @@ -45,7 +45,7 @@ _cleanup() . common/filter # real QA test starts here -_supported_fs btrfs +_require_test_reflink _supported_os Linux _require_xfs_io_command "fiemap" diff --git a/tests/generic/801 b/tests/generic/801 index b21c44b..aedb6e9 100755 --- a/tests/generic/801 +++ b/tests/generic/801 @@ -45,7 +45,7 @@ _cleanup() . common/filter # real QA test starts here -_supported_fs btrfs +_require_test_reflink _supported_os Linux _require_xfs_io_command "fiemap" diff --git a/tests/generic/802 b/tests/generic/802 index afd8513..51d3414 100755 --- a/tests/generic/802 +++ b/tests/generic/802 @@ -43,7 +43,7 @@ _cleanup() . ./common/filter # real QA test starts here -_supported_fs btrfs +_require_test_reflink _supported_os Linux _require_xfs_io_command "fiemap"