From patchwork Tue Sep 5 19:11:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 9939555 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 E414160350 for ; Tue, 5 Sep 2017 19:11:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5410289EB for ; Tue, 5 Sep 2017 19:11:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA34E289FE; Tue, 5 Sep 2017 19:11:26 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 7B40E289EB for ; Tue, 5 Sep 2017 19:11:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752591AbdIETLU (ORCPT ); Tue, 5 Sep 2017 15:11:20 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33631 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752556AbdIETLM (ORCPT ); Tue, 5 Sep 2017 15:11:12 -0400 Received: by mail-wm0-f65.google.com with SMTP id 187so3680466wmn.0; Tue, 05 Sep 2017 12:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jDOE/HMnimD9dxosCLOOCalah3+pT3rXAyM2JpGykAA=; b=OirTYfff9L4Xxxg18R8nCVYPZDT4RGhxOtEtGvfZa5x/Sew7otime7VIwqB81kdJTp 2Sj64lpUP7KgSepMSyw0PMAsLWeimwJzEmX4L/FprtfIDtV3b3GQTICsev0QoG5aKWiA HKSRH8vbsDgHio+zZ8kJoN57g1o8AWUo2LoGHk+bDEujaRXmbvllhm6vL9ZLoBogmJLd 7NvJ/4gBez0h1erkzkuc/rKSRdcgiIviV4SukTTf/5myyDs+bmvlkxsoeu0s++KpTdMR 74VWmmWVV6UxuJweo6oHzJfSAYEL9U+QtmszXtLXapVTyA37OpaZeUjpiMcCmB1SkQxL RVHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jDOE/HMnimD9dxosCLOOCalah3+pT3rXAyM2JpGykAA=; b=Ki6CkHZ6/RaDI2BjBxaHa/B1nmDFgSczLztZ4uANBz6FweqIjVj+G0YD7WNPpV4O3s xPsHzznH4Tqa/fd9GZAjxy8EecRAOtQN/SIFSrLSJtHo7iPL4qBqIwLPxTxoeW5/MJR5 MG5YNUbp9yEmbCcrLsMo+0JfGnQ8wjMmbLzGf8Nj48kAWc79gs9yIo06GFN9LVa+Bj3i eO4rImh2zBHMfGjAHJ4yl/msQuBPIGArcLWaiKXVDbMHRUTht0fi/HbkB9PJ7m/7r7Px faM1MfNPb2b3TAWHCzUFUd5+HMw8R1tBrFbYntpvJbOrnd3ZZcLSL96bCffcqg0UGR+d fRCQ== X-Gm-Message-State: AHPjjUgR8QmR7PJ63FeWcT7lyrn4h/uGjA8ouUGTOR5VCwOoc0eH26Si IGFwFZ50iVeX5g== X-Google-Smtp-Source: ADKCNb4XCekxmldf/GvtsMaZajAbMUvgUoi6b4GsA1ef3uuI+h3Yz0fUQ+yLjwaBe0rtu7ClOxMagA== X-Received: by 10.28.165.23 with SMTP id o23mr6263wme.103.1504638671354; Tue, 05 Sep 2017 12:11:11 -0700 (PDT) Received: from localhost.localdomain (bzq-79-182-137-119.red.bezeqint.net. [79.182.137.119]) by smtp.gmail.com with ESMTPSA id 30sm1829015wry.34.2017.09.05.12.11.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Sep 2017 12:11:10 -0700 (PDT) From: Amir Goldstein To: Eryu Guan Cc: Josef Bacik , fstests@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v3 13/13] fstests: regression test for xfs leftover CoW extent error Date: Tue, 5 Sep 2017 22:11:20 +0300 Message-Id: <1504638680-25682-14-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504638680-25682-1-git-send-email-amir73il@gmail.com> References: <1504638680-25682-1-git-send-email-amir73il@gmail.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Amir Goldstein --- tests/generic/503 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/503.out | 2 ++ tests/generic/group | 1 + 3 files changed, 72 insertions(+) create mode 100755 tests/generic/503 create mode 100644 tests/generic/503.out diff --git a/tests/generic/503 b/tests/generic/503 new file mode 100755 index 0000000..ebda756 --- /dev/null +++ b/tests/generic/503 @@ -0,0 +1,69 @@ +#! /bin/bash +# FS QA Test No. 503 +# +# Regression test for xfs leftover CoW extents error +# +#----------------------------------------------------------------------- +# Copyright (C) 2017 CTERA Networks. All Rights Reserved. +# Author: Amir Goldstein +# +# 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! + +_cleanup() +{ + cd / + rm -f $tmp.* +} +trap "_cleanup; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter +. ./common/reflink + +# real QA test starts here +_supported_fs generic +_supported_os Linux +_require_scratch_reflink +_require_cp_reflink + +rm -f $seqres.full + +_scratch_mkfs >/dev/null 2>&1 +_scratch_mount + +$XFS_IO_PROG -f -c "pwrite 0 0x40000" \ + $SCRATCH_MNT/foo > /dev/null 2>&1 + +cp --reflink $SCRATCH_MNT/foo $SCRATCH_MNT/bar + +$XFS_IO_PROG -f -c "fzero -k 0x169f 0x387c" \ + -c "fcollapse 0x29000 0xd000" \ + -c "finsert 0 0x8000" \ + -c "truncate 0x8000" \ + $SCRATCH_MNT/foo > /dev/null 2>&1 + +echo "Silence is golden" +status=0 +exit diff --git a/tests/generic/503.out b/tests/generic/503.out new file mode 100644 index 0000000..6c1400a --- /dev/null +++ b/tests/generic/503.out @@ -0,0 +1,2 @@ +QA output created by 503 +Silence is golden diff --git a/tests/generic/group b/tests/generic/group index 4324775..7a9cd78 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -460,3 +460,4 @@ 500 auto log replay 501 auto quick metadata 502 auto log replay clone +503 auto quick clone