From patchwork Wed May 10 17:46:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9720285 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 E83156035D for ; Wed, 10 May 2017 17:46:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 155D128622 for ; Wed, 10 May 2017 17:46:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07CA92862C; Wed, 10 May 2017 17:46:52 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 7B74628622 for ; Wed, 10 May 2017 17:46:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752901AbdEJRqr (ORCPT ); Wed, 10 May 2017 13:46:47 -0400 Received: from mx142.netapp.com ([216.240.21.19]:11514 "EHLO mx142.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752285AbdEJRqp (ORCPT ); Wed, 10 May 2017 13:46:45 -0400 X-IronPort-AV: E=Sophos;i="5.38,320,1491289200"; d="scan'208";a="187610553" Received: from hioexcmbx08-prd.hq.netapp.com ([10.122.105.41]) by mx142-out.netapp.com with ESMTP; 10 May 2017 10:31:45 -0700 Received: from VMWEXCCAS12-PRD.hq.netapp.com (10.122.105.30) by hioexcmbx08-prd.hq.netapp.com (10.122.105.41) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 10 May 2017 10:46:43 -0700 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS12-PRD.hq.netapp.com (10.122.105.30) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Wed, 10 May 2017 10:46:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=gw3veTWLAIkFYje+GCIyQHcEzTmlU+GsGWp/hA+2uNM=; b=TTR+AIvodnkfqRxHFUznnw6CPuUGViFJby2+bi2NjEarftUMaiWp20q+TvmazCXG2yssE75pnrajnURyDv/Lnl2JgMEIA/CdvTcLExnY4ANdBUZwQ91gvqlxUNqx6+0i1qUhp9+5B+ZpOtpmRUXiAR/fCxe7djM0EOfdZgyhd9k= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=Netapp.com; Received: from gouda.nowheycreamery.com.nowheycreamery.com (68.40.188.1) by MWHPR06MB2479.namprd06.prod.outlook.com (10.168.248.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11; Wed, 10 May 2017 17:46:42 +0000 From: Anna Schumaker To: CC: , , Subject: [PATCH v6 2/5] generic/430: Add small copies to new file test Date: Wed, 10 May 2017 13:46:25 -0400 Message-ID: <20170510174628.22895-3-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170510174628.22895-1-Anna.Schumaker@Netapp.com> References: <20170510174628.22895-1-Anna.Schumaker@Netapp.com> MIME-Version: 1.0 X-Originating-IP: [68.40.188.1] X-ClientProxiedBy: MWHPR1601CA0024.namprd16.prod.outlook.com (10.172.93.34) To MWHPR06MB2479.namprd06.prod.outlook.com (10.168.248.15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f6e69f5a-4bd3-47bd-df3f-08d497cc855b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:MWHPR06MB2479; X-Microsoft-Exchange-Diagnostics: 1; MWHPR06MB2479; 3:EOVX39JVdXB6CegEhHag1dMAI6fFOgl1nuxAfVPYvy0RAqeQBJ4jysdoDSfwBSKLbWDQo8f1SXvao5vCzWMY4MimStIf9wzCKxnLf2eaZQ6zq545/PyRqJFW18a1fA9Gm8KIJpL0BYPzeRar1Qky8M2ct80FWuIv8t5E4PQHTb7VVXEYyBpwakQnusTGU9q4ddO07r+0Kow4mS4Wn6fW98VdA8xeyWx8Qgx1nYuKC5EzbMkmrwFcxl1De9PQdj8j2Gjva9hv8MAMdq3s7xqC0p9T8AHiO0BUj3N6FE1mn8qZNnQVRWTRtUjaadCvphzaf8Ngi2530pfJfJFQGq4xtQ==; 25:qiYKY9xdLGrNn5SE/CWeK4/PUd1jWY8n/gu1b2oDUaAhT8ImvMVXqB2jPFxfRrn25Nu0lDfv3tcGdoYUc5/afIjn9UYjJHH1OyZ0K8yjPLszKLY7PYhn24Lo2JTcbhok/5FilmtKjS7zrCahiRNGEyKJ15fjlKWchkLLff0YZQXnPe6M95jpTu5x6aQWCeJTIA7vZzl+0Bdn1Tlyacam0gOW8akcS/RcwOg4j8lrvftaW5uavMtjzMeTd7Hs95ps46KouehW1BjtSlnszWcuO9iAY5nO7oa0K2y65uyjjFIKh/SXbBE3g4qdnM40ykVI/geol89FRYLM3eMGbg6igCoYkE7P5uea+bkTw/gTsCi5OJDDQfsXaaORvmpr3/T/+JIsX0PZjwLGJtzQcZ+yq2YaKVlcO/JW6SZhfHn5WGseONL1WM0yGWp41lYKXb9snfOV+KACX0F2O4gL/y1UF4r6vRmoOzkdNLf2bqGUUeI= X-LD-Processed: 4b0911a0-929b-4715-944b-c03745165b3a,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; MWHPR06MB2479; 31:/vgxuwVLivsqT1DLMnk8cG4D41rdHChuXgpIj5nN49IBdlQsG0Pmf7g9EZG0nwpFae+d6xghdfMdGr0GiO6ezEBIYmLqClX70wRMNGSlMkBcLvySgsYaJGA0FxGDtqHNE6Rhzoi1agAfQFds2fuMytrmyNqjgQ1zrNJXItZo3zI4kkebELgW8lTS9h7kcVmODB/j6yGeHnMFMMf5ogJsfXOblfsICK5BjXM5+aSgfXatnc2AmEbL6tejuUrslyP+; 20:xYVGzAZhe4BZVzz6kI4r1jrEUchSG0CG/6K6evUSsU1uikWQ2Y4drVQ9D5yloA+p6DO+HmtgmtDY4jaiRgfxFYGXXRjLxBGkmFMmRrC0ZLbeujgHg0p6TeLQvmlEiphsCMy3XBMnuU1icvIvWxBbNQcPVtwitsTBMPfGdkAXIfa5wZZqMT5opGkrRFOcCFb5xvpZ5QyvIC3XYVj0tuF15f0lMaTE+Nt9NadDtRnz8o3eSDz1Yk4j3M0AykGN1paT/MCW9RzP6//53bVzFFcAt80nI3IgCJtIg42BoMgKgkqTQ0UhhDis8P6S0CJaq7v8dax+UctgsVcBSxPUJT32eQDT1m49FCnitEgUd8tAGxM+dMivCqJEh6orKVT0Tbs/Kvrq1gj4Ro94+wPs9mbar8tMrMksUP5105ir89tZT7l4USyp2ToiR3p9jMhl+CsPnvLFdrmA6OLl/ShaniFOeMX3Od/Fz758iKRAxdX+cXKmoogK+/g+8akApNyv1qCR X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123560025)(20161123562025)(20161123555025)(6072148); SRVR:MWHPR06MB2479; BCL:0; PCL:0; RULEID:; SRVR:MWHPR06MB2479; X-Microsoft-Exchange-Diagnostics: 1; MWHPR06MB2479; 4:HNGudd/0ZLeNVguPPSNSQtgmiIFL3vZQX4pPnrq/DjvTCt45C71xac5Dls1oW/0XwwOQd4/6aR8meChp7MDP4saCjnhHEXh6dmCyhjRZemCcoqI6qG+pCG3J6FnU5O27Hbcc7M5Iy2jv5o+riLsdc/qpLQb9/SLBcyoZPtk315Hg4G1CZeVCmlAY+VFlWwnYcziMFhk6m1Wz6Dysg7iT4BlKohszyTUbExPXm4ZUAX0mfPU8ZtLSdwU6H2lrqJYj9LJrbhTEefdgXMA3wF+RRcP1ZQqgpWqMve5FWpi86zg1y/os+zm57pt/gr/CnzDN0DlGpCmTnDUTVE3oY9C8Tuz34tpdJEVHf1aY0bZDu3DPupBrARjI08Ovh1Pjl4fILiQzqximCfFbg84yH2nDCABBKo9bHKQYJnhp8L/W8VsANyt0i7T0SGjTjTmjHxZktLwJdnj4NnW/ncgPadrgsoGCM1LJiMQzTSHidA/UNMtbtmERX9Fr634oGG0opFu96BW0iD8ZUBNSqITM8Xjhq7B7zwW5+7wv8jREDIqjjh1+/T6KlGCamdb6K0Gu2bmd01z93TyFdg75WH1zrQCqa3Dgg+505xOfodmfCggP82LkQlzXiu8mbAjI5SRFxwFs7QlLzMyvSlzBJjWNjIh8cK8mJwnh1sxV41St7Ko0c2pAnz1iS98L4Zn1yNbhQHkMzUoxv5Ay2+QTyhDdXB2MUSFQQDXHPujuaaK9WY8S9z280RFSbTwdADO5zNGOrCpGaGpfmhXUCPFR/R4YUGzIY6i9rUzKqmUczBkdl3KJ3lU= X-Forefront-PRVS: 03030B9493 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39850400002)(39410400002)(39450400003)(39400400002)(6512007)(54906002)(4326008)(189998001)(3846002)(6486002)(6506006)(2906002)(6116002)(25786009)(1076002)(38730400002)(86362001)(66066001)(72206003)(110136004)(50466002)(48376002)(575784001)(2351001)(42186005)(81166006)(8676002)(5003940100001)(478600001)(50226002)(47776003)(5660300001)(53936002)(36756003)(6666003)(2950100002)(76176999)(50986999)(7736002)(305945005)(6916009)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR06MB2479; H:gouda.nowheycreamery.com.nowheycreamery.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR06MB2479; 23:7R5flV5VMZOkWhTidl102Ma94AnHLQiV3xZBA9b78?= =?us-ascii?Q?0Axl/W5EWqT6vjblZaE4Snzy6bNxH1Vrl0P0dS2R6uTnlg0noSvIedDPMMHp?= =?us-ascii?Q?G0ymj5hOK0DvT5vTTgJTuj/UAjRNMScU78vx7vQ1bCvba/CIwyBf9bz+KzLC?= =?us-ascii?Q?/9/ksyRJhST74PqVUQNIrt7RDit8UTznlYFqelthihyw5I2SmIJr5UREMaVJ?= =?us-ascii?Q?w88BukZb5kdZBO537/yr6NgMUEqQAblMtbB7TSJOPqNRGAL3xyZ/UM9iqG3B?= =?us-ascii?Q?0KBT2FloL5Z3gr29IKQrHCq0a7IMZScXD5k3ND9b2y+fMF9JalR0Zi/l7P+9?= =?us-ascii?Q?Fz4QhwomRuVENY9UXRcLVDVOkHqmxiwFERRVenhHyPgzN+ARiL6OpvDftcta?= =?us-ascii?Q?6uoW9iwxTExqsrK+tJoj1RKgk2R+PPi4UJmaaWucxYX2ktg69FmwC8gazLJZ?= =?us-ascii?Q?ZzXLFaFl5wk4t68hYE4S7465JdJK/kDcj3QzqCv1cwZCXWatyeG2GPIX7BWQ?= =?us-ascii?Q?XnAnYLWdji13vsI34sBn7If4sd0yHm5A6YjL33m/e4low+Qyx0/tZyWIoInC?= =?us-ascii?Q?x74wC7opl2paY8chfE0uK3mmZwnkYprZ7gUpvewN6uOA43iKVTR0E4jn0fCK?= =?us-ascii?Q?S7srFigRVB2rNfQMQLlHF16xjSdPrefaW32eH9Wv0rwtJ3H+g7KuB5eF0Nks?= =?us-ascii?Q?Jx2N4iaK3YoFv1OhsJAUAxJbp35nT+A66Ow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mArxK3+N/vZMIcMJMyZdDgOgX0pDNZSxc+O+24r/gSvONbD7b9A74CKpNl0P7b2MfsRcUMDyJVtVJ00VVmHb/8gLi3fmXRaLFHaXZy7plSVPeLWpeYr+PqLkIIrRoV2YzdScJKNbPOcTg==; 24:cIniDm/E6G1tVSU+1xynyl17yqQJN4aYTGLofziQapOQ/aob/AZhY1ViL8M+8/E/rPxgnbus1MYJ2ajs8cRU3TnehU9nmuhZQ6IaUZULMTM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR06MB2479; 7:j4sMSNZJitbH7rQ4wDmTZ23VBw+AVfgZ8CAysn4gOMd6B72dTLUjyRyjJvNfJhXA87vK5iBfgh0KmKay2xPGX/uJNDaBe1V3y/jQPOKK+bWoiSmytdDgeVFGqx8bhavjZwvpewgfpiDoYcu1O1drMhfVoogcFCVuPgMuRic/00FgWvk20KOYpYQkuGGQaSnntchUPGAkLUN6ssIBCYVI/GZirN9GwrURZXdyP2U0crzu3I8aXh7gVEulJW1xFtYv4Ld+XTU6lO/19GvCVHHE6PAi1TfhjdXTS0xf/yylsIrvLDYvZ/dWHf2/qj0Pe9XOfMgU72bMIoBf6IqgO7bedw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2017 17:46:42.8162 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR06MB2479 X-OriginatorOrg: netapp.com Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This test copies single bytes from a source file into various new files just to make sure that we can handle very small copies. Signed-off-by: Anna Schumaker --- tests/generic/430 | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/430.out | 15 ++++++++++ tests/generic/group | 1 + 3 files changed, 99 insertions(+) create mode 100755 tests/generic/430 create mode 100644 tests/generic/430.out diff --git a/tests/generic/430 b/tests/generic/430 new file mode 100755 index 00000000..750f8522 --- /dev/null +++ b/tests/generic/430 @@ -0,0 +1,83 @@ +#!/bin/bash +# FS QA Test No. 430 +# +# Tests vfs_copy_file_range(): +# - Copy a small file +# - Small copies from various points in the original file +#----------------------------------------------------------------------- +# Copyright (c) 2017 Netapp, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -rf $tmp.* +} + +# get standard environment +. common/rc +. common/filter + +# real QA test starts here +_supported_fs generic +_supported_os Linux + +_require_xfs_io_command "copy_range" +_require_test + +testdir=$TEST_DIR/test-$seq +rm -rf $testdir +mkdir $testdir +rm -f $seqres.full + +echo "Create the original file and then copy" +echo -n "abcde" > $testdir/file +$XFS_IO_PROG -f -c "copy_range $testdir/file" "$testdir/copy" +echo -n "abcde" | cmp $testdir/copy +echo "Original md5sums:" +md5sum $testdir/{file,copy} | _filter_test_dir + +echo "Small copies from various points in the original file" +$XFS_IO_PROG -f -c "copy_range -s 0 -l 1 $testdir/file" "$testdir/a" 2>&1 +$XFS_IO_PROG -f -c "copy_range -s 1 -l 1 $testdir/file" "$testdir/b" 2>&1 +$XFS_IO_PROG -f -c "copy_range -s 2 -l 1 $testdir/file" "$testdir/c" 2>&1 +$XFS_IO_PROG -f -c "copy_range -s 3 -l 1 $testdir/file" "$testdir/d" 2>&1 +$XFS_IO_PROG -f -c "copy_range -s 4 -l 1 $testdir/file" "$testdir/e" 2>&1 +$XFS_IO_PROG -f -c "copy_range -s 4 -l 1 -d 1 $testdir/file" "$testdir/f" 2>&1 +$XFS_IO_PROG -f -c "copy_range -s 5 -l 1 $testdir/file" "$testdir/g" 2>&1 +echo -n "a" | cmp $testdir/a +echo -n "b" | cmp $testdir/b +echo -n "c" | cmp $testdir/c +echo -n "d" | cmp $testdir/d +echo -n "e" | cmp $testdir/e +echo -en "\0e" | cmp $testdir/f +echo -n "" | cmp $testdir/g +echo "md5sums after small copies" +md5sum $testdir/{file,a,b,c,d,e,f,g} | _filter_test_dir + +#success, all done +status=0 +exit diff --git a/tests/generic/430.out b/tests/generic/430.out new file mode 100644 index 00000000..1bdfbf6f --- /dev/null +++ b/tests/generic/430.out @@ -0,0 +1,15 @@ +QA output created by 430 +Create the original file and then copy +Original md5sums: +ab56b4d92b40713acc5af89985d4b786 TEST_DIR/test-430/file +ab56b4d92b40713acc5af89985d4b786 TEST_DIR/test-430/copy +Small copies from various points in the original file +md5sums after small copies +ab56b4d92b40713acc5af89985d4b786 TEST_DIR/test-430/file +0cc175b9c0f1b6a831c399e269772661 TEST_DIR/test-430/a +92eb5ffee6ae2fec3ad71c777531578f TEST_DIR/test-430/b +4a8a08f09d37b73795649038408b5f33 TEST_DIR/test-430/c +8277e0910d750195b448797616e091ad TEST_DIR/test-430/d +e1671797c52e15f763380b45e841ec32 TEST_DIR/test-430/e +2015eb238d706eceefc784742928054f TEST_DIR/test-430/f +d41d8cd98f00b204e9800998ecf8427e TEST_DIR/test-430/g diff --git a/tests/generic/group b/tests/generic/group index 1c0fbb73..b5f115af 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -432,3 +432,4 @@ 427 auto quick aio rw 428 auto quick 429 auto quick copy +430 auto quick copy