From patchwork Wed May 10 17:46:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9720297 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 C06B4603F8 for ; Wed, 10 May 2017 17:46:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E182328622 for ; Wed, 10 May 2017 17:46:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D665628627; Wed, 10 May 2017 17:46:55 +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 437A128623 for ; Wed, 10 May 2017 17:46:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753151AbdEJRqx (ORCPT ); Wed, 10 May 2017 13:46:53 -0400 Received: from mx141.netapp.com ([216.240.21.12]:15165 "EHLO mx141.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753114AbdEJRqw (ORCPT ); Wed, 10 May 2017 13:46:52 -0400 X-IronPort-AV: E=Sophos;i="5.38,320,1491289200"; d="scan'208";a="201395879" Received: from vmwexchts01-prd.hq.netapp.com ([10.122.105.12]) by mx141-out.netapp.com with ESMTP; 10 May 2017 10:32:40 -0700 Received: from VMWEXCCAS06-PRD.hq.netapp.com (10.122.105.22) by VMWEXCHTS01-PRD.hq.netapp.com (10.122.105.12) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 10 May 2017 10:46:42 -0700 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS06-PRD.hq.netapp.com (10.122.105.22) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Wed, 10 May 2017 10:46:42 -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=4GQn8c+fAnSm/uORQUWSv2y4SfjA0cs+OiPsOi/cC9o=; b=mqr7W55Mea85HmFNYdDyZEXJehpGypqL1wd1uhXY8fRfpDJL9Hs14T2Yw/lvKDD6cJBtgMHOh/uOw1NxFqnJGbwPx6rqSK1Q5L/Y/vxU8bIdbEu+6FOo7Jljh3Xih/rbPAEHRiNRUSnw6yu4MNmgMk0qexkxX58G7KXh7NB3u/E= 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:41 +0000 From: Anna Schumaker To: CC: , , Subject: [PATCH v6 1/5] generic/429: Add copy to new file test Date: Wed, 10 May 2017 13:46:24 -0400 Message-ID: <20170510174628.22895-2-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: 60c8446a-f9aa-441f-acbc-08d497cc84da X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:MWHPR06MB2479; X-Microsoft-Exchange-Diagnostics: 1; MWHPR06MB2479; 3:iISt6n0vjk8SA8gWayMasCHA/ujtEcG+wp6S2TERM2grG5I69QnGh72EbYXXBgzNO5xbp1Q/7ksyx83TvumL2V55FO929Vtwxan9MK3jicZjS97xQBe6cz+v/Pv1e1/qfoY7ZimU6/ie6zoFV+CwIARfaMEZRkstV+X8tK1lL+k1h8Y2X2UfrmRQhWI3/8AXS9U0dWTgt2cK1i78j7ye1GZPPNmAlUN0d8BW86u6tWu0Yw4wrQfk3mAfQ18MlBkemIQSEx8VU0NsNmHt0zASd7tU5FJCRjpe//mwd1wJJ6xyZVRHtYlB8ZGAfTmuZY2Es1lAvqpGHHfLzeBI+W17og==; 25:C2dF7AgYwonDuEh1ETI63oWyiurzqW4un9EeDDPXnUTOMP/hGcaOnhAaHGt3jzlZu8CUB7S69FaXhscm4brwK6IfBnSV/mzqQFUBeban+QBWHJoC3gZvosQRp3mK5Ig0iukEOtJVLUqwVp96tnpBW4mrTHZoslBgsBf7seDbJxtMwBCVRcWutiMHrAg/BiHuy8MBfLBORZzanyJlcsWE5S3sBMs2nx0odE85baCioalYq79nHzdEPyW7FXGqd7Cklw4YtEDaFn7tQXOwj7Kb1RLuIEoFKHyKltSIqK9dq2h8NvqYTS+DsAHYx1qZz9hRTau9gXigLB8eHmnWZ2bcfIQjvVCkl6f9modjP4zAyVt7WtoSc6HubAJjukoNm87N0P6nEq/+EOMTFw4fADLO4Vnq/rj/G/SdpNeE1YwBu/7oE/pSTd7nflNXxQviqGLXCnveRHUH9i5UXGz4+OFQGHkE15UZ0kbPDIDS9rZAUBw= X-LD-Processed: 4b0911a0-929b-4715-944b-c03745165b3a,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; MWHPR06MB2479; 31:SLRiTpsl0XSdjFdTf0aUl7MknxYlOvPaMYJkLPGZLcSHVACiNaUe0+0tcdtwDZ0XQYP35fOzSnUiTUpkK5hlvaQi29rsv0H3YqIEyl/K5tKcMFTid7x98W+urbnCvL/DeL3WyUac78odXE19WSZMNvR+qSGvFHkzhAg9/J9cVdc1A+kLVp2sB8M1JgjHtrkxqmq78Yf4nlVQaYAW6CYV4k/JvUl3XOX90X585VdpcEM=; 20:+oRA3CWPoMapS1KdsdZl4j1j7adep4+LZLg93cNIGsVKwI3urOjjraLgXdnWynDXCETXFPOWErWaMSG5Az0CveHKEY+B9N4zZVTEf21fVQvPr/DlQ4bVN0yim+9AWD1PePeXItZm7ynr8wk2+DB1Nf/k4uokScMnMgm+b+Ek7KBr703Bj/eNp3w3m2NmKLBtSFZvHmYtu8AMnLFDhwcZqy5CgE0xhx/PPDDOVGbD3m+9bwWBOJOh/vwijcSv+h6wEuewzCnOrBKAEjO4uFhaTEY32vDzAslVlBLozpOWXer1qvhgMSPK4HDK4wyCg3qR2OZTz7S9vKO3MEPgcPjkVkBsJ1hPiVWDixGQk9aCfdgfJ52hwA6ZScxG8BMc4HNdfazb33tirGH7ecjfL/cwv+cREXVtkzZL04TYU0Wu0mDZNIb+jjZGU5V1f++WfrriJ/u0BkS4LfnVx+9ZdDtzB+Aei37GAPUb2XjAWjEfwWPyAugBmTaBNsAWf0aK/pYN 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:VZoRjAUQDrz2wRsKO/1zPWncTr3Krv42EEVyhnak4g43uuWb5A45BQZ4PbWkkA/+oXI4ENK5mNSt8hH6jah2OPrv24cU/2p+rJ7ZOILs6EMZMrgN2KXBzpom/cwrJlqL2OrB/vTxToWRyoYNjtaXKaxbIcSjWQ98gv/ZbfPsFh9/pJB3AGrbSdjBxZPda9pA6xajFFka7lPI2Oy7Djp3AzBkOjJEHMAbAa6/AbPs8drbW7UoWkON7FP4QS5dTS4dzII8jKy5Gtfryfgrd3EltupAzxEguqJVqIzdiYvxVPto0/t4j6+gX+m8JuWdLV938B56AoSvt05mHrAWE6PwS6+KYUghwyebBtmshcavA2t0JAHOBcGRvmUzCikRTH7BCiddciOwRjXm1O2kZzHACWGHa34m2Pjpt0vPiDnk/UhUKO6gQVJH5S6D7Ce9BJ7Vexu6i80SDORtiIVvhIDsLB9L0IetcEPOJ8U/trfpgJswrBvi3BQjN1iHpcrplxUAC903PqQlYTtyBcrFw051TppXADApbLWF92ruZlJEAu0HUEMFSECCBPqFdHXNCod2uUxFNPiJUHEipvIWyePznNyirTpNyInr2HLWehzBD6ZSNpmSze7IWTT/PqZrzuU7O9WX548RU1z6Mr5x+Sgiyhae9RBCKs/IuCs1dzpygYYrCgJA1T/CtuABgABZ5f/2YCl74oj7ObZT5/Ym30HOPicszHISeCKwuoP5ueaR2HmYaR7KI1sf0t/Sg2qESsF5eoukBZnlKwOG/d9UMwfA+U2VLfqjSQdmQNBNw0kXfL01g+EYkq1EgkEHyX9e/Hm6 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:LB9bQoj6ZS8+PYnRAbVEjGXfz4QYdPEg0hzn4NzHn?= =?us-ascii?Q?w5Xu+0OC7n5sChR38lxCqn9feVWqT53hzxpGwt9MHz6jxKvj5SonrWgDO5Zg?= =?us-ascii?Q?V880R8NdOyBvHTid/yuCZOyJNh0Wf9x0odQU5/7MrMKyjTZHZpErtMJ4+WIE?= =?us-ascii?Q?pnfjtuBAEHqfxa6QW6m++VDcn9hUwtouZYeHw5h4fUtGI3XNNtS6EqEznjqW?= =?us-ascii?Q?s35U+fiPmhCoH8yph4JYvONXjQgXP0XJyN/YXmcIpeijXOokVAoUljdl9BnA?= =?us-ascii?Q?yx+q7E92XQiS13tQ7U5wJP1V35mQT2BWr8aKJwp5ny+RroYyOWE7enGBpdXn?= =?us-ascii?Q?7bStFkjL2oVzsZFB/73FiEpurHLoi1e7yyw5SbvsRffo6OVGQQdgHoRuTgtK?= =?us-ascii?Q?7wMYoblKjEqkK3dmETqG8k3J6V4LgNiYM81Wcnfy8MWYfN1245eZy3+gPTrk?= =?us-ascii?Q?LGfC/pIiebLnOXSJl/vVo2e3zR3nli3GGO440e7vpHQKQRq4xicjm/QOqXj7?= =?us-ascii?Q?0Pg4C23EEBNMYvpCFHBBvZ9zqnlFrhb35Kg+lsYRimcaZYjqiBZAJlSQ/Pm8?= =?us-ascii?Q?AmzQ7WNhu/JQLY5xxENj6OmZuewe+NAhWM9vRFrOE6AnC2HU5giIdEug5UMM?= =?us-ascii?Q?kLrl17MJDTz2HsdTxzPifyxwJU0W7/k24aNOBTtQfuCC3eXBDtw4g0IPsoV9?= =?us-ascii?Q?HEKKizVh5osK14XYt0MxtVrZFhSblj6NVgeySPzZuu4svW69HOXXfgqZi1/F?= =?us-ascii?Q?LkDqWr1roI3N6gtxhyuT0++M1TPF6YqEMRoXdvzb/gEllASV7sCtXPcVjoXu?= =?us-ascii?Q?n6AM7dTUApiMHJ6rBzytf2d4RycaQmxJNKu+hj9mTWxp77mmb62sEy+ymJ0G?= =?us-ascii?Q?ZuTu5bGCS/9dPm/1KpwIwTAQ8MbzLeaz1dgQ7jO8lI7hT9kJ4qYRO2IuqO+t?= =?us-ascii?Q?KI0d73ynxXUl9/96WtHB1VcI4cnaGpNbagP4/ZBpKHy8Kb8ZZySn0mIJ/FIw?= =?us-ascii?Q?5/DuCBypLzKcJuOnWIrAMT8v5EqI0M4fSn7pJ8qA6KDZkhZwBT3DqKv6wRjI?= =?us-ascii?Q?dA96dQRQkFvnr2+bCUD80xe/4a5khNSk53GGLbnFeVR+sCqaetP310NAJIDz?= =?us-ascii?Q?rsllTcm2a0=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR06MB2479; 6:kt9TLRAmIvzFhDKjG1uDEZnLyq8wBsk3/P65B8UiA+8v24iinrc4QQF9lMLl752OVd68K3+WT59xHalbHj/ad2dMymhEiAv158CX6QucwpYQYqBk5ppEb51E8AEp526HaIY45gV2acIgjO8iC66SskQNpn7PD8QMlOb+LTZT6ORuX7nCaqlzpFomkD5Fw5Cg9CfIfSJLqWo5zSzzsVhQij1yP1Ymtvq6chK7jpP0AbnBvHgD+e8eBJf6xjgYjURo9H7djIOlEZhw29+FPkNtpzYX6fL1PPwJgLDX8WlrTorgEnF6B0MomE+IRtb6+8uT9+9B3E9Gn04G8qwETSzu/NBMH4X9TvVSZohoii2PsdHXcqxfR2QL2u8KHydDdx4ZpxQadtsEkdShh/FBcspg90MD/usdpiB6y+Bjz5DKVyIleDTWsK/E5vOBjEkRWioZNX1f8uNtlc5jbUaS3bl/rc/+i1Sne8853GlVIYS9s6gP0uuqzw8zagHZZ2FekDeNnKT6Sqh5B0xvjWlHQU7vlg==; 5:ls6mI5QOXLzzUXHgysoATYL8CGf1d8wHmrcQM70ozitcT8yFRDKVFTBBpmG3EkM2Y/JgNDIo8RK3U0BaQKsfik09jsFjgM4FkPDGj39qPElDs1JyKWttx+ZYyG6OQKLfAYEYCWI5hbybI8ecESx8Fw==; 24:obAlaLIEhziAkLgp7qo/kTVMj/1aYkfSgApt3I3wfEPZ3SPXLRh0g47rUCtoBxR3n4UrjQQkpD8pW52YmpqFSyUN/lQNgUauRBoiOceSK6Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR06MB2479; 7:yB1RyD5C/2OIsuEVP/S9uPZcK+b1hA5DWxIbbj0SF690izNpaU4ic6R8sKJpe6Ox1g5J6m9Pms/NQ+io82Ayz6vqmVtnDKIbst+KgQabNzWzX5Hk50KbtEY9HMdlz+oW3WOm7w0pFeke7n9K6tiC1g2pt7KXxvIHizSJHq0V8uNWZQQ9RPAQDmQYVC6GdPe8jnsx2rJkoAKno1BfGqRkFTD0Xwn/WRMz7tQhIR6XkTgl7P/NGWC7+NS75f5WwiQoYeqz/9uiuid//d42VhlCCAXI3XHIl4kx7ia0OAJDI1HJm/av2BtEEU01uVdPpCO8nncMgKRMpHrvbmInsTpysQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2017 17:46:41.9624 (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 data from various points in a source file to a new file. This is useful for testing the basics of copy_file_range(). Signed-off-by: Anna Schumaker --- common/rc | 6 +++ tests/generic/429 | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/429.out | 25 +++++++++++++ tests/generic/group | 1 + 4 files changed, 134 insertions(+) create mode 100755 tests/generic/429 create mode 100644 tests/generic/429.out diff --git a/common/rc b/common/rc index 8dafd4bc..816d06a6 100644 --- a/common/rc +++ b/common/rc @@ -2047,6 +2047,12 @@ _require_xfs_io_command() "chproj") testio=`$XFS_IO_PROG -F -f -c "chproj 0" $testfile 2>&1` ;; + "copy_range") + testcopy=$TEST_DIR/$$.copy.xfs_io + $XFS_IO_PROG -F -f -c "pwrite 0 4k" $testfile 2>&1 > /dev/null + testio=`$XFS_IO_PROG -F -f -c "copy_range $testfile" $testcopy 2>&1` + rm -f $testcopy 2>&1 > /dev/null + ;; "falloc" ) testio=`$XFS_IO_PROG -F -f -c "falloc $param 0 1m" $testfile 2>&1` ;; diff --git a/tests/generic/429 b/tests/generic/429 new file mode 100755 index 00000000..fb52df8b --- /dev/null +++ b/tests/generic/429 @@ -0,0 +1,102 @@ +#!/bin/bash +# FS QA Test No. 429 +# +# Tests vfs_copy_file_range(): +# - Copy a file +# - Copy beginning of original to new file +# - Copy middle of original to a new file +# - Copy end of original to new file +# - Copy middle of original to a new file, creating a hole +#----------------------------------------------------------------------- +# 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" +$XFS_IO_PROG -f -c 'pwrite -S 0x61 0 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x62 1000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x63 2000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x64 3000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c 'pwrite -S 0x65 4000 1000' $testdir/file >> $seqres.full 2>&1 +$XFS_IO_PROG -f -c "copy_range $testdir/file" "$testdir/copy" +cmp $testdir/file $testdir/copy +echo "Original md5sums:" +md5sum $testdir/{file,copy} | _filter_test_dir + +echo "Copy beginning of original file" +$XFS_IO_PROG -f -c "copy_range -l 1000 $testdir/file" "$testdir/beginning" 2>&1 +cmp -n 1000 $testdir/file $testdir/beginning +echo "md5sums after copying beginning:" +md5sum $testdir/{file,beginning} | _filter_test_dir + +echo "Copy middle of original file" +$XFS_IO_PROG -f -c "copy_range -s 1000 -l 3000 $testdir/file" "$testdir/middle" 2>&1 +cmp -n 3000 $testdir/file $testdir/middle 1000 +echo "md5sums after copying middle:" +md5sum $testdir/{file,middle} | _filter_test_dir + +echo "Copy end of original file" +$XFS_IO_PROG -f -c "copy_range -s 4000 -l 1000 $testdir/file" "$testdir/end" 2>&1 +cmp -n 1000 $testdir/file $testdir/end 4000 +echo "md5sums after copying end:" +md5sum $testdir/{file,end} | _filter_test_dir + +echo "Copy beyond end of original file" +$XFS_IO_PROG -f -c "copy_range -s 4000 -l 2000 $testdir/file" "$testdir/beyond" 2>&1 +cmp -n 1000 $testdir/file $testdir/end 4000 +echo "md5sums after copying beyond:" +md5sum $testdir/{file,beyond} | _filter_test_dir + +echo "Copy creates hole in target file" +$XFS_IO_PROG -f -c "copy_range -s 1000 -l 3000 -d 1000 $testdir/file" "$testdir/hole" 2>&1 +cmp -n 3000 $testdir/file $testdir/hole 1000 1000 +echo "md5sums after creating hole:" +md5sum $testdir/{file,hole} | _filter_test_dir + +#success, all done +status=0 +exit diff --git a/tests/generic/429.out b/tests/generic/429.out new file mode 100644 index 00000000..8de90a44 --- /dev/null +++ b/tests/generic/429.out @@ -0,0 +1,25 @@ +QA output created by 429 +Create the original file and then copy +Original md5sums: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-429/file +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-429/copy +Copy beginning of original file +md5sums after copying beginning: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-429/file +cabe45dcc9ae5b66ba86600cca6b8ba8 TEST_DIR/test-429/beginning +Copy middle of original file +md5sums after copying middle: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-429/file +4197de9da5badfc302715486b82bcdf1 TEST_DIR/test-429/middle +Copy end of original file +md5sums after copying end: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-429/file +e68d4a150c4e42f4f9ea3ffe4c9cf4ed TEST_DIR/test-429/end +Copy beyond end of original file +md5sums after copying beyond: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-429/file +e68d4a150c4e42f4f9ea3ffe4c9cf4ed TEST_DIR/test-429/beyond +Copy creates hole in target file +md5sums after creating hole: +e11fbace556cba26bf0076e74cab90a3 TEST_DIR/test-429/file +3ae9aef0992f8cb51c90c9a0ff2dd9d2 TEST_DIR/test-429/hole diff --git a/tests/generic/group b/tests/generic/group index b3051752..1c0fbb73 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -431,3 +431,4 @@ 426 auto quick exportfs 427 auto quick aio rw 428 auto quick +429 auto quick copy