From nobody Sat Feb 7 07:03:03 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=1592241198; cv=none; d=zohomail.com; s=zohoarc; b=ASjerdKFMlufXzOF2Z203M/X88S4XQc1fJEjTMMPbvAxRCPtdakqdONIr78RjldBydpI+tDBFVup2QP1pkfD1ZqewxgJhetxTeUuoKN8aBaCkUhIMaR2sipI23ofVj2UskQqROVfncth0Na3eNbmOIl5wCdKrhrvIpII/nySdjI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592241198; 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=ZdtsWCfaMJWV6TbXSwAOq4udENTOcZAeJjBCfYO75go=; b=GnNA/rAwhmEjuC6bkEez5Zn8FyqYJridFzgg9G1F5wr0vgXocWFc6pHVJglqB1uLavpHWQATEhhl6Zk37rRj1bP0B/OjNMFBHwb2m3PpeHRVzYAn9wwhFGWEqV3cZ1yk8Ap06fsJqTF5ZAcsbVIKi5cV5qXSFqVy69wdOzyVQTA= 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 1592241198584130.0834338494658; Mon, 15 Jun 2020 10:13:18 -0700 (PDT) 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-493-U2AfjzKeOvK9mcxC_-c5HQ-1; Mon, 15 Jun 2020 13:11:13 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5BBB78730EB; Mon, 15 Jun 2020 17:11:04 +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 411357FE9E; Mon, 15 Jun 2020 17:11:04 +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 13BD7104912; Mon, 15 Jun 2020 17:11:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05FHAtXR004924 for ; Mon, 15 Jun 2020 13:10:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 95ED61002394; Mon, 15 Jun 2020 17:10:55 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1055F100238D for ; Mon, 15 Jun 2020 17:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592241197; 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=ZdtsWCfaMJWV6TbXSwAOq4udENTOcZAeJjBCfYO75go=; b=eqpV8kR8ETGZjleP62Bu6VH5sqKN4LLub30ZD3pmi5pVaTvJoUp+gwZPv4JNGj7LWeeEWN eakbfHztl4/SwP/qyAmv7VdEKwNarmgG5kthlApP7Zz50XQzW4zCgvMetcTkR5h2C5zKQO AI4X+VR6rJFCnRrldBKbcjOxDTphkBo= X-MC-Unique: U2AfjzKeOvK9mcxC_-c5HQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 24/32] qemublocktest: Add 'basic' tests for backup bitmap handling Date: Mon, 15 Jun 2020 19:10:11 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The 'basic' case is just a single backing store layer containing the bitmaps so we just copy the bitmaps over to the backup bitmap. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- tests/qemublocktest.c | 4 +++ .../backupmerge/basic-deep-out.json | 25 +++++++++++++++++++ .../backupmerge/basic-flat-out.json | 25 +++++++++++++++++++ .../backupmerge/basic-intermediate-out.json | 25 +++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 tests/qemublocktestdata/backupmerge/basic-deep-out.json create mode 100644 tests/qemublocktestdata/backupmerge/basic-flat-out.json create mode 100644 tests/qemublocktestdata/backupmerge/basic-intermediate-= out.json diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 30662f6f79..1300e0cbe9 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -1263,6 +1263,10 @@ mymain(void) TEST_BACKUP_BITMAP_CALCULATE("empty", bitmapSourceChain, "a", "empty"); + TEST_BACKUP_BITMAP_CALCULATE("basic-flat", bitmapSourceChain, "current= ", "basic"); + TEST_BACKUP_BITMAP_CALCULATE("basic-intermediate", bitmapSourceChain, = "d", "basic"); + TEST_BACKUP_BITMAP_CALCULATE("basic-deep", bitmapSourceChain, "a", "ba= sic"); + #define TEST_CHECKPOINT_DELETE(testname, delbmp, named) \ do { \ checkpointdeletedata.name =3D testname; \ diff --git a/tests/qemublocktestdata/backupmerge/basic-deep-out.json b/test= s/qemublocktestdata/backupmerge/basic-deep-out.json new file mode 100644 index 0000000000..ff77af789b --- /dev/null +++ b/tests/qemublocktestdata/backupmerge/basic-deep-out.json @@ -0,0 +1,25 @@ +[ + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "target_node", + "name": "target-bitmap-name", + "persistent": false, + "disabled": true, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "target_node", + "target": "target-bitmap-name", + "bitmaps": [ + { + "node": "libvirt-1-format", + "name": "a" + } + ] + } + } +] diff --git a/tests/qemublocktestdata/backupmerge/basic-flat-out.json b/test= s/qemublocktestdata/backupmerge/basic-flat-out.json new file mode 100644 index 0000000000..4637bbc377 --- /dev/null +++ b/tests/qemublocktestdata/backupmerge/basic-flat-out.json @@ -0,0 +1,25 @@ +[ + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "target_node", + "name": "target-bitmap-name", + "persistent": false, + "disabled": true, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "target_node", + "target": "target-bitmap-name", + "bitmaps": [ + { + "node": "libvirt-1-format", + "name": "current" + } + ] + } + } +] diff --git a/tests/qemublocktestdata/backupmerge/basic-intermediate-out.jso= n b/tests/qemublocktestdata/backupmerge/basic-intermediate-out.json new file mode 100644 index 0000000000..f2f3b3f568 --- /dev/null +++ b/tests/qemublocktestdata/backupmerge/basic-intermediate-out.json @@ -0,0 +1,25 @@ +[ + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "target_node", + "name": "target-bitmap-name", + "persistent": false, + "disabled": true, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "target_node", + "target": "target-bitmap-name", + "bitmaps": [ + { + "node": "libvirt-1-format", + "name": "d" + } + ] + } + } +] --=20 2.26.2