From nobody Mon Feb 9 06:50:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1578594130; cv=none; d=zohomail.com; s=zohoarc; b=jwCish1Rpgl7egjBFxcmAF4JpDErclDDwHzVL7A13W/To1ZTsLVejWheVv25ZL1vKvfBPGmJWDfed54hhHQWPHH3glnzK2ax+Hg2Y+jhBvJF8v04IdkKpnMOjTt9qn0UO5rlywj5TAOAFmD3/b6UmBakrB9BWj05xg8gh7kuezo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578594130; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=egneNVAo9CmETHYr6NsylMRW2vxVpmB30bA3qF47be0=; b=VMYILwjhOeQdT3Qden6RJOETI+jYHUtfF4H+lJZvHzsJNnqZUbGgV2XUsuAQvxq3y/OgqDpJJgSTWf9Z7kKafYrSlsq3CFLZTXo9msIN8/8SOSYTJ9oaLWG+BivGyisMTZvJhNfsDBsv+1LGkHhZDtcIzt/0VZVMjUgN+e8gWgQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1578594130769995.835983557463; Thu, 9 Jan 2020 10:22:10 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-406-_NMvBc-QOCqeXasCBmDhCw-1; Thu, 09 Jan 2020 13:22:08 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D05AD1007286; Thu, 9 Jan 2020 18:21:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A746D5DA66; Thu, 9 Jan 2020 18:21:59 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 65D49503D8; Thu, 9 Jan 2020 18:21:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 009ILjvH018367 for ; Thu, 9 Jan 2020 13:21:45 -0500 Received: by smtp.corp.redhat.com (Postfix) id A48EB9A84; Thu, 9 Jan 2020 18:21:45 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0530E7C3E1; Thu, 9 Jan 2020 18:21:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578594129; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=egneNVAo9CmETHYr6NsylMRW2vxVpmB30bA3qF47be0=; b=ingPL5Mcr2c0SDbuThTdN0FpW634qLgremEfzP7gdTvv62q7WuCeveUGzE6Bn+HUVIXjQi P2j6DN8EsQu8RLtVXHRNAj+tJKGKA4M/xj8esBL+H7PeX/cSTqc5T+ZduaKp8leFbul00/ G7dOubhoDRbrhZG0vj3FJP5+dHZjfWc= From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 9 Jan 2020 19:21:20 +0100 Message-Id: <17840951a7a3fb012061fbf8d52c4c0a4709904d.1578593859.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [RFC PATCH 14/16] tests: qemublock: Add checkpoint deletion test for deep backing chain X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: _NMvBc-QOCqeXasCBmDhCw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Add test cases for merging various pairs of bitmaps when snapshots were created together with checkpoints. Signed-off-by: Peter Krempa --- tests/qemublocktest.c | 6 +++ .../snapshots-current-out.json | 29 +++++++++++ .../snapshots-intermediate1-out.json | 22 ++++++++ .../snapshots-intermediate2-out.json | 52 +++++++++++++++++++ .../snapshots-intermediate3-out.json | 52 +++++++++++++++++++ .../snapshots-noparent-out.json | 23 ++++++++ 6 files changed, 184 insertions(+) create mode 100644 tests/qemublocktestdata/checkpointdelete/snapshots-curr= ent-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/snapshots-inte= rmediate1-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/snapshots-inte= rmediate2-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/snapshots-inte= rmediate3-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/snapshots-nopa= rent-out.json diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 293757b8d4..b8a052b19b 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -1015,6 +1015,12 @@ mymain(void) TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate3", "d", "c", "basic"); TEST_CHECKPOINT_DELETE_MERGE("basic-current", "current", "d", "basic"); + TEST_CHECKPOINT_DELETE_MERGE("snapshots-noparent", "a", NULL, "snapsho= ts"); + TEST_CHECKPOINT_DELETE_MERGE("snapshots-intermediate1", "b", "a", "sna= pshots"); + TEST_CHECKPOINT_DELETE_MERGE("snapshots-intermediate2", "c", "b", "sna= pshots"); + TEST_CHECKPOINT_DELETE_MERGE("snapshots-intermediate3", "d", "c", "sna= pshots"); + TEST_CHECKPOINT_DELETE_MERGE("snapshots-current", "current", "d", "sna= pshots"); + cleanup: virHashFree(diskxmljsondata.schema); qemuTestDriverFree(&driver); diff --git a/tests/qemublocktestdata/checkpointdelete/snapshots-current-out= .json b/tests/qemublocktestdata/checkpointdelete/snapshots-current-out.json new file mode 100644 index 0000000000..1b607567e8 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/snapshots-current-out.json @@ -0,0 +1,29 @@ +[ + { + "type": "block-dirty-bitmap-enable", + "data": { + "node": "libvirt-1-format", + "name": "d" + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-1-format", + "target": "d", + "bitmaps": [ + { + "node": "libvirt-1-format", + "name": "current" + } + ] + } + }, + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-1-format", + "name": "current" + } + } +] diff --git a/tests/qemublocktestdata/checkpointdelete/snapshots-intermediat= e1-out.json b/tests/qemublocktestdata/checkpointdelete/snapshots-intermedia= te1-out.json new file mode 100644 index 0000000000..29fefeea63 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate1-out.= json @@ -0,0 +1,22 @@ +[ + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-3-format", + "target": "a", + "bitmaps": [ + { + "node": "libvirt-3-format", + "name": "b" + } + ] + } + }, + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-3-format", + "name": "b" + } + } +] diff --git a/tests/qemublocktestdata/checkpointdelete/snapshots-intermediat= e2-out.json b/tests/qemublocktestdata/checkpointdelete/snapshots-intermedia= te2-out.json new file mode 100644 index 0000000000..ca5627269c --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate2-out.= json @@ -0,0 +1,52 @@ +[ + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-2-format", + "name": "b", + "persistent": true, + "disabled": true, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-2-format", + "target": "b", + "bitmaps": [ + { + "node": "libvirt-2-format", + "name": "c" + } + ] + } + }, + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-2-format", + "name": "c" + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-3-format", + "target": "b", + "bitmaps": [ + { + "node": "libvirt-3-format", + "name": "c" + } + ] + } + }, + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-3-format", + "name": "c" + } + } +] diff --git a/tests/qemublocktestdata/checkpointdelete/snapshots-intermediat= e3-out.json b/tests/qemublocktestdata/checkpointdelete/snapshots-intermedia= te3-out.json new file mode 100644 index 0000000000..ee7ae97fdb --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate3-out.= json @@ -0,0 +1,52 @@ +[ + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-1-format", + "name": "c", + "persistent": true, + "disabled": true, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-1-format", + "target": "c", + "bitmaps": [ + { + "node": "libvirt-1-format", + "name": "d" + } + ] + } + }, + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-1-format", + "name": "d" + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-2-format", + "target": "c", + "bitmaps": [ + { + "node": "libvirt-2-format", + "name": "d" + } + ] + } + }, + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-2-format", + "name": "d" + } + } +] diff --git a/tests/qemublocktestdata/checkpointdelete/snapshots-noparent-ou= t.json b/tests/qemublocktestdata/checkpointdelete/snapshots-noparent-out.js= on new file mode 100644 index 0000000000..45a84b47c2 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/snapshots-noparent-out.json @@ -0,0 +1,23 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-3-format", + "name": "a" + } + }, + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-4-format", + "name": "a" + } + }, + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-5-format", + "name": "a" + } + } +] --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list