From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83B41C433E0 for ; Fri, 5 Mar 2021 18:36:33 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3A7C06508B for ; Fri, 5 Mar 2021 18:36:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A7C06508B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIFJQ-00028B-5o for qemu-devel@archiver.kernel.org; Fri, 05 Mar 2021 13:36:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIEMW-0004my-1M; Fri, 05 Mar 2021 12:35:40 -0500 Received: from mail-eopbgr30124.outbound.protection.outlook.com ([40.107.3.124]:32132 helo=EUR03-AM5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIEMU-0005C4-0t; Fri, 05 Mar 2021 12:35:39 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BOiNeRriohHXg8wlftsSnnPWfMXP03xx3mpeyMCs6kird8t6NBZ5YJsYXqOecIHhmeHxrnwuTB8o3cQI1MQB7LH5SiRineIRIivWfPKaX2tl4u7r9xKoiiBimzuMPvrLyCyh4+lVJDa82ocLxCy2iHqq3szpvPK6NPCyU0LDWIqEKfwqf8zFYuNJSaDpJYMwrzSzeSnXIjSDHsf7U6VQZlmnKGyIXG+Tqu2EoyGKpmD0lAxaRGe6GApEJZnBg3fH0ysAYnzTpTXr4+BbyoHGk0CrVKD1B8LIX/nW2ee1sQxXlo2gVUMOkagHkD83bz/ythkG9AWLtltIC3ZCBHXi1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iXZs9GFBvUAXNvJ2vlQnOgXar2kFLPug2NV9BHHGUJM=; b=Xk6pZYc52P6Mr8Pr0WR5sDTco15/WDONDFAGTREV4X5VSbyFeWE7ZdT0wIv6a5d56q7h4569OJ34jSXa54XblQMbq40S1aOt5jrJQ17GzraFSma8Om91/4gpI0GxZ67/45+R3NpcUk/WYI5A6KPgMsKpq9DYxHhvsWIKqDuSxMdsROvq5e4Klzk0bBd8c7ZcxzVtcKV9RGLD5tMPnBHJ7c1wHy4sBes3wBy1rJjCjmIpATiHrMtXDub+8rQawTTTYO8RJ+PSsyFeb5gBi+LCFJ8Mxr8ubMum1CZTWKGKmWCYwoR3MqD3jNmJWs53DLhYupQVaEj3EES3p6UKmxeykQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iXZs9GFBvUAXNvJ2vlQnOgXar2kFLPug2NV9BHHGUJM=; b=t0vYq4dlB6otliWusoBSiLhMX4LoGLUMXN3mmc4iX29n6mRVUrI0HlNB4EZfrZQ4kOGL4/C2yml5YXNO148Vqh7QF5eE2gQjYMMTOOvZQ+qSyI5bRS61/qvV6DjWXBlZ9p1kfaGEWLWwE5nd/XYGou5j1WI+bUSXMxI6L0HQGHc= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB4408.eurprd08.prod.outlook.com (2603:10a6:20b:be::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Fri, 5 Mar 2021 17:35:26 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::f1f0:6610:11f5:5e4a%8]) with mapi id 15.20.3912.024; Fri, 5 Mar 2021 17:35:26 +0000 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, crosa@redhat.com, ehabkost@redhat.com, mreitz@redhat.com, kwolf@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com Subject: [PATCH v3 2/6] iotests: add qcow2-discard-during-rewrite Date: Fri, 5 Mar 2021 20:35:03 +0300 Message-Id: <20210305173507.393137-3-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210305173507.393137-1-vsementsov@virtuozzo.com> References: <20210305173507.393137-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [185.215.60.202] X-ClientProxiedBy: HE1PR02CA0119.eurprd02.prod.outlook.com (2603:10a6:7:29::48) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (185.215.60.202) by HE1PR02CA0119.eurprd02.prod.outlook.com (2603:10a6:7:29::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Fri, 5 Mar 2021 17:35:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eb09c3f9-4313-4d06-6278-08d8dffd0fd8 X-MS-TrafficTypeDiagnostic: AM6PR08MB4408: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3826; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zrFI6hczVfJQ472FMlivgjBHm/3mNc89moELM9Cn9oy3zCkHeMSBJnyUp5M9AUfEgGM0UUu//5wzt6QYPsvhK9NTa3OKHv4Q2wBB3NxgXG80+PaiveTfnbXGUGbCmpw79JafYER0xSKtzhrTHv0QRZhO5G2CzeY8L8xPUhc337M9XKDOdFHD0uyQAS3u/M/L5UP03Pn+kyfHn+aBApTC2PRxOcXnMYk1iVgvAleNqmqgFljGmLjIy6fmsEeTFjDPWjtZo/d6XFbP0lEX4gMLrU7fIv4PGL1QV7yUYNJ/7czsJsLh25ELnjOVPbjMhNg3N34RcCevYplRu0kmegVJvtMJ0WaQyCv4ZI9HZ51qEhpwGlWZCCxCARxot+klEVOLV4ybliu7I7RDD0DHP2P1ghXHuh3dma9Z/VO+d6/gQa9KlcDDEyOAwjmRIGyd2TND2Mntlg9ams113oF4kJCBnpht+m1X9tw5xo2AhQJQr9V4MlFd7/vrEHCIktTTFtt1S8JIZ+18PUJ9M7E+IYy9jLpErC0avgRm2T+gLG62D7+hIyPzfcFD46uDNxe6/fYoZgIZZwsibCauPIUKy2eSVg0oQlxS2Xqrdi37zeNhcyhZsRoog/dfXljSj8MmiZtUU6lDWCKzkkmWmMYfZdVHXawKtDO5taGWXajBuy56wzCWo371wrj+ibdj600htERRXwxPogB6pKX7QI793bm6JQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(39850400004)(396003)(376002)(346002)(16526019)(66476007)(478600001)(186003)(8936002)(8676002)(6916009)(1076003)(956004)(6486002)(83380400001)(69590400012)(52116002)(26005)(6666004)(6506007)(2906002)(2616005)(4326008)(66556008)(316002)(6512007)(36756003)(66946007)(86362001)(5660300002)(2004002)(21314003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?49nsfyEgaMwBsFKsz9zfV7gXo0PrYEM+2FdjUv5mleWq36KRrrycyfVKYZd9?= =?us-ascii?Q?BKgs1Xbn2IgxdSDxin/pc1iSwUPVyqjyUO5LQTjjzQVYSKx6bWZKjRo0D7ne?= =?us-ascii?Q?7TDsZ2GiTPhuQjljsC+C2fbYHw8B8u3eH6egpbk5Xj4F1eEG1AjQkvIaELj/?= =?us-ascii?Q?vdeB5lCZT31MnYQQQojsbq/fRGfyaXSeYdhxX1M2rXUOTB4eurwamegX4UMV?= =?us-ascii?Q?s5RvzOB5VECRrP4G5imYugJycyVsEgXClUFFJb71IjSZEj6vLiiQ+M2FuJHr?= =?us-ascii?Q?Cd/qHwXjgwRjQGmbqNK+yZRh6DLR4f9S7K/dnOOCHkTsxcPpN9ibLVWKCndO?= =?us-ascii?Q?im7inexKkg7qL9aF7lbigFuBHUTW0otRaw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B8tFgKcnjwkx31m41wWbN045eyolXpeGYWAR5nFuxkd/T4wC2KhYRby1Ws?= =?us-ascii?Q?uzEkaKDKQ1O6qqjK7quKW1Vh?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb09c3f9-4313-4d06-6278-08d8dffd0fd8 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2021 17:35:26.0057 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4+XEAk/JEV+hHh8VNCINx1s+d4LWYKs/1k48rcULCRfE0NDpe2I3rp456kmRv1C1sIrJ+QnXpSyVRKPaG6CRE24zg9zf36EUXHZn4uQxDbI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4408 Received-SPF: pass client-ip=40.107.3.124; envelope-from=vsementsov@virtuozzo.com; helo=EUR03-AM5-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Simple test: - start writing to allocated cluster A - discard this cluster - write to another unallocated cluster B (it's allocated in same place where A was allocated) - continue writing to A For now last action pollutes cluster B which is a bug fixed by the following commit. For now, add test to "disabled" group, so that it doesn't run automatically. Signed-off-by: Vladimir Sementsov-Ogievskiy --- .../tests/qcow2-discard-during-rewrite | 72 +++++++++++++++++++ .../tests/qcow2-discard-during-rewrite.out | 21 ++++++ 2 files changed, 93 insertions(+) create mode 100755 tests/qemu-iotests/tests/qcow2-discard-during-rewrite create mode 100644 tests/qemu-iotests/tests/qcow2-discard-during-rewrite.out diff --git a/tests/qemu-iotests/tests/qcow2-discard-during-rewrite b/tests/qemu-iotests/tests/qcow2-discard-during-rewrite new file mode 100755 index 0000000000..7f0d8a107a --- /dev/null +++ b/tests/qemu-iotests/tests/qcow2-discard-during-rewrite @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +# group: quick disabled +# +# Test discarding (and reusing) host cluster during writing data to it. +# +# Copyright (c) 2021 Virtuozzo International GmbH. +# +# 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; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will 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, see . +# + +# creator +owner=vsementsov@virtuozzo.com + +seq=`basename $0` +echo "QA output created by $seq" + +status=1 # failure is the default! + +_cleanup() +{ + _cleanup_test_img +} +trap "_cleanup; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./../common.rc +. ./../common.filter + +_supported_fmt qcow2 +_supported_proto file fuse +_supported_os Linux + +size=1M +_make_test_img $size + +( +cat <