From patchwork Thu Nov 24 01:51:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 9444687 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 D1A0560778 for ; Thu, 24 Nov 2016 01:52:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9BA727569 for ; Thu, 24 Nov 2016 01:52:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA1ED1FF15; Thu, 24 Nov 2016 01:52:38 +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.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham 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 2AD0C1FF15 for ; Thu, 24 Nov 2016 01:52:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750749AbcKXBwh (ORCPT ); Wed, 23 Nov 2016 20:52:37 -0500 Received: from userp1050.oracle.com ([156.151.31.82]:17306 "EHLO userp1050.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750763AbcKXBwh (ORCPT ); Wed, 23 Nov 2016 20:52:37 -0500 Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by userp1050.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uAO1qMXA003978 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Nov 2016 01:52:22 GMT Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uAO1pHon009791 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Nov 2016 01:51:18 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id uAO1pHEj002066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Nov 2016 01:51:17 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id uAO1pGWC004412; Thu, 24 Nov 2016 01:51:17 GMT Received: from localhost (/24.21.211.40) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 23 Nov 2016 17:51:16 -0800 Date: Wed, 23 Nov 2016 17:51:15 -0800 From: "Darrick J. Wong" To: david@fromorbit.com, eguan@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH v2 1/3] generic/182: retain existing btrfs behavior when len == 0 Message-ID: <20161124015115.GB30324@birch.djwong.org> References: <147986705412.27133.3961713804630246198.stgit@birch.djwong.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <147986705412.27133.3961713804630246198.stgit@birch.djwong.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: userp1040.oracle.com [156.151.31.81] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since btrfs has always interpreted src_length=0 as "return 0 having taken no action", test for that instead. Signed-off-by: Darrick J. Wong --- tests/generic/182 | 6 +++--- tests/generic/182.out | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe fstests" 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/generic/182 b/tests/generic/182 index f484399..7fafec0 100755 --- a/tests/generic/182 +++ b/tests/generic/182 @@ -1,10 +1,10 @@ #! /bin/bash # FS QA Test No. 182 # -# Test the convention that dedupe with length == 0 means "to the end of fileA" +# Test the convention that dedupe with length == 0 always returns success. # - Create a file. -# - Try to dedupe "zero" bytes (which means dedupe to EOF). -# - Check that the dedupe happened. +# - Try to dedupe "zero" bytes. +# - Check that the dedupe happened and nothing changed. # #----------------------------------------------------------------------- # Copyright (c) 2015, Oracle and/or its affiliates. All Rights Reserved. diff --git a/tests/generic/182.out b/tests/generic/182.out index 049a3ee..9841b76 100644 --- a/tests/generic/182.out +++ b/tests/generic/182.out @@ -1,12 +1,10 @@ QA output created by 182 Create the original files -dedupe: Extents did not match. f4820540fc0ac02750739896fe028d56 TEST_DIR/test-182/file1 69ad53078a16243d98e21d9f8704a071 TEST_DIR/test-182/file2 69ad53078a16243d98e21d9f8704a071 TEST_DIR/test-182/file2.chk Compare against check files Make the original file almost dedup-able -dedupe: Extents did not match. f4820540fc0ac02750739896fe028d56 TEST_DIR/test-182/file1 158d4e3578b94b89cbb44493a2110fb9 TEST_DIR/test-182/file2 158d4e3578b94b89cbb44493a2110fb9 TEST_DIR/test-182/file2.chk