From nobody Mon Feb 9 01:11:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1583342845; cv=none; d=zohomail.com; s=zohoarc; b=ZQ1MW1/CkPxx0WjqjHK4BmaEPbkIuxy0sXpahIK9Z+SsE1HyPc5HQU5bW3Oe38foqEavMOhOnH0YP9w3CyFiqXUVVsfnZ94wAq2UWz1MdvhkcAqt5Y3F+mEABS2ODaHyMGA/MuEn3IgTAdfJ5f83xWwV+RHIX4x6YddVSf9jv6U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583342845; h=Content-Type:Content-Transfer-Encoding:Cc: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=D2XNkuUA4PfSwK1QtETLad+lCppapb/GFUQrGFN1T78=; b=l/1Ruspgm6mdoa2S0YpdZp4YcN51c9Dw4UQf5j2BQru1/uHW3s/z4fs/EDGZ6zmkU54MZmtkBaQH0y+aY0yoUxsTw61bA3qp4DnYLVtZiFmMD4fCZAV/2gqxFAIOCbGojc9rF5RyJADtWh+S6LDzgwtXacu9rnzlGuDRmNnLak4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1583342845885915.5294499143695; Wed, 4 Mar 2020 09:27:25 -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-208-jQHpvEu_OPifS6cPPqEX2Q-1; Wed, 04 Mar 2020 12:27:21 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 85B9F1081FAF; Wed, 4 Mar 2020 17:27:14 +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 5744E60F89; Wed, 4 Mar 2020 17:27:14 +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 11A5A86A10; Wed, 4 Mar 2020 17:27:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 024HQsLf027361 for ; Wed, 4 Mar 2020 12:26:54 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4E1898D57F; Wed, 4 Mar 2020 17:26:54 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C2608D55E; Wed, 4 Mar 2020 17:26:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583342844; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=D2XNkuUA4PfSwK1QtETLad+lCppapb/GFUQrGFN1T78=; b=KAIQRY9bpg1iZKIQaC73CT1/9oLLn1BxCSzkqV0qlAyKbryPz1nmXvxw4jCO66ptiLwXf8 oaAqDFvDs6tcss+GZoCRHBvtlCYGR1+gP95E1Q+o6cfgWEQwuI2UxqtP0jBx9VPiSwulan DdvA0Mgj3/BeCy/XBmDl1NubdaPsJJs= X-MC-Unique: jQHpvEu_OPifS6cPPqEX2Q-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 08/13] qemublocktest: Add tests of broken bitmap chain handling during block-commit Date: Wed, 4 Mar 2020 18:26:36 +0100 Message-Id: <337f1c9679909d75a0052e522c03de089b839e05.1583342236.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Peter Krempa 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.12 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" Use the 'snapshots-synthetic-broken' test data for block-commit. Signed-off-by: Peter Krempa --- tests/qemublocktest.c | 13 ++++ .../snapshots-synthetic-broken-1-2 | 30 ++++++++ .../snapshots-synthetic-broken-1-3 | 66 ++++++++++++++++ .../snapshots-synthetic-broken-1-4 | 76 +++++++++++++++++++ .../snapshots-synthetic-broken-1-5 | 76 +++++++++++++++++++ .../snapshots-synthetic-broken-2-3 | 43 +++++++++++ .../snapshots-synthetic-broken-2-4 | 53 +++++++++++++ .../snapshots-synthetic-broken-2-5 | 53 +++++++++++++ .../snapshots-synthetic-broken-3-4 | 30 ++++++++ .../snapshots-synthetic-broken-3-5 | 30 ++++++++ .../snapshots-synthetic-broken-4-5 | 20 +++++ 11 files changed, 490 insertions(+) create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-syn= thetic-broken-1-2 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-syn= thetic-broken-1-3 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-syn= thetic-broken-1-4 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-syn= thetic-broken-1-5 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-syn= thetic-broken-2-3 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-syn= thetic-broken-2-4 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-syn= thetic-broken-2-5 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-syn= thetic-broken-3-4 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-syn= thetic-broken-3-5 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-syn= thetic-broken-4-5 diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 5eb38c3981..b782e7969d 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -1305,6 +1305,19 @@ mymain(void) TEST_BITMAP_BLOCKCOMMIT("snapshots-4-5", 4, 5, "snapshots"); + TEST_BITMAP_BLOCKCOMMIT("snapshots-synthetic-broken-1-2", 1, 2, "snaps= hots-synthetic-broken"); + TEST_BITMAP_BLOCKCOMMIT("snapshots-synthetic-broken-1-3", 1, 3, "snaps= hots-synthetic-broken"); + TEST_BITMAP_BLOCKCOMMIT("snapshots-synthetic-broken-1-4", 1, 4, "snaps= hots-synthetic-broken"); + TEST_BITMAP_BLOCKCOMMIT("snapshots-synthetic-broken-1-5", 1, 5, "snaps= hots-synthetic-broken"); + + TEST_BITMAP_BLOCKCOMMIT("snapshots-synthetic-broken-2-3", 2, 3, "snaps= hots-synthetic-broken"); + TEST_BITMAP_BLOCKCOMMIT("snapshots-synthetic-broken-2-4", 2, 4, "snaps= hots-synthetic-broken"); + TEST_BITMAP_BLOCKCOMMIT("snapshots-synthetic-broken-2-5", 2, 5, "snaps= hots-synthetic-broken"); + + TEST_BITMAP_BLOCKCOMMIT("snapshots-synthetic-broken-3-4", 3, 4, "snaps= hots-synthetic-broken"); + TEST_BITMAP_BLOCKCOMMIT("snapshots-synthetic-broken-3-5", 3, 5, "snaps= hots-synthetic-broken"); + + TEST_BITMAP_BLOCKCOMMIT("snapshots-synthetic-broken-4-5", 4, 5, "snaps= hots-synthetic-broken"); cleanup: virHashFree(diskxmljsondata.schema); diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-1-2 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-1-2 new file mode 100644 index 0000000000..ab269d9256 --- /dev/null +++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-= 1-2 @@ -0,0 +1,30 @@ +pre job bitmap disable: +[ + +] +merge bitmpas: +[ + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-2-format", + "name": "current", + "persistent": true, + "disabled": false, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-2-format", + "target": "current", + "bitmaps": [ + { + "node": "libvirt-1-format", + "name": "current" + } + ] + } + } +] diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-1-3 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-1-3 new file mode 100644 index 0000000000..6eb14f927a --- /dev/null +++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-= 1-3 @@ -0,0 +1,66 @@ +pre job bitmap disable: +[ + { + "type": "block-dirty-bitmap-disable", + "data": { + "node": "libvirt-3-format", + "name": "b" + } + } +] +merge bitmpas: +[ + { + "type": "block-dirty-bitmap-enable", + "data": { + "node": "libvirt-3-format", + "name": "b" + } + }, + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-3-format", + "name": "current", + "persistent": true, + "disabled": false, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-3-format", + "target": "current", + "bitmaps": [ + { + "node": "libvirt-1-format", + "name": "current" + } + ] + } + }, + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-3-format", + "name": "c", + "persistent": true, + "disabled": true, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-3-format", + "target": "c", + "bitmaps": [ + { + "node": "libvirt-2-format", + "name": "c" + } + ] + } + } +] diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-1-4 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-1-4 new file mode 100644 index 0000000000..fbf2bc0554 --- /dev/null +++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-= 1-4 @@ -0,0 +1,76 @@ +pre job bitmap disable: +[ + +] +merge bitmpas: +[ + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-4-format", + "name": "b", + "persistent": true, + "disabled": false, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-4-format", + "target": "b", + "bitmaps": [ + { + "node": "libvirt-3-format", + "name": "b" + } + ] + } + }, + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-4-format", + "name": "current", + "persistent": true, + "disabled": false, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-4-format", + "target": "current", + "bitmaps": [ + { + "node": "libvirt-1-format", + "name": "current" + } + ] + } + }, + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-4-format", + "name": "c", + "persistent": true, + "disabled": true, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-4-format", + "target": "c", + "bitmaps": [ + { + "node": "libvirt-2-format", + "name": "c" + } + ] + } + } +] diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-1-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-1-5 new file mode 100644 index 0000000000..477f921050 --- /dev/null +++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-= 1-5 @@ -0,0 +1,76 @@ +pre job bitmap disable: +[ + +] +merge bitmpas: +[ + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-5-format", + "name": "b", + "persistent": true, + "disabled": false, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-5-format", + "target": "b", + "bitmaps": [ + { + "node": "libvirt-3-format", + "name": "b" + } + ] + } + }, + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-5-format", + "name": "current", + "persistent": true, + "disabled": false, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-5-format", + "target": "current", + "bitmaps": [ + { + "node": "libvirt-1-format", + "name": "current" + } + ] + } + }, + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-5-format", + "name": "c", + "persistent": true, + "disabled": true, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-5-format", + "target": "c", + "bitmaps": [ + { + "node": "libvirt-2-format", + "name": "c" + } + ] + } + } +] diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-2-3 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-2-3 new file mode 100644 index 0000000000..d468e2b9d8 --- /dev/null +++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-= 2-3 @@ -0,0 +1,43 @@ +pre job bitmap disable: +[ + { + "type": "block-dirty-bitmap-disable", + "data": { + "node": "libvirt-3-format", + "name": "b" + } + } +] +merge bitmpas: +[ + { + "type": "block-dirty-bitmap-enable", + "data": { + "node": "libvirt-3-format", + "name": "b" + } + }, + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-3-format", + "name": "c", + "persistent": true, + "disabled": true, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-3-format", + "target": "c", + "bitmaps": [ + { + "node": "libvirt-2-format", + "name": "c" + } + ] + } + } +] diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-2-4 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-2-4 new file mode 100644 index 0000000000..d5bce940d9 --- /dev/null +++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-= 2-4 @@ -0,0 +1,53 @@ +pre job bitmap disable: +[ + +] +merge bitmpas: +[ + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-4-format", + "name": "b", + "persistent": true, + "disabled": false, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-4-format", + "target": "b", + "bitmaps": [ + { + "node": "libvirt-3-format", + "name": "b" + } + ] + } + }, + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-4-format", + "name": "c", + "persistent": true, + "disabled": true, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-4-format", + "target": "c", + "bitmaps": [ + { + "node": "libvirt-2-format", + "name": "c" + } + ] + } + } +] diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-2-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-2-5 new file mode 100644 index 0000000000..2da87865a1 --- /dev/null +++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-= 2-5 @@ -0,0 +1,53 @@ +pre job bitmap disable: +[ + +] +merge bitmpas: +[ + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-5-format", + "name": "b", + "persistent": true, + "disabled": false, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-5-format", + "target": "b", + "bitmaps": [ + { + "node": "libvirt-3-format", + "name": "b" + } + ] + } + }, + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-5-format", + "name": "c", + "persistent": true, + "disabled": true, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-5-format", + "target": "c", + "bitmaps": [ + { + "node": "libvirt-2-format", + "name": "c" + } + ] + } + } +] diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-3-4 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-3-4 new file mode 100644 index 0000000000..feb54e1af4 --- /dev/null +++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-= 3-4 @@ -0,0 +1,30 @@ +pre job bitmap disable: +[ + +] +merge bitmpas: +[ + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-4-format", + "name": "b", + "persistent": true, + "disabled": false, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-4-format", + "target": "b", + "bitmaps": [ + { + "node": "libvirt-3-format", + "name": "b" + } + ] + } + } +] diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-3-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-3-5 new file mode 100644 index 0000000000..ced2a3751c --- /dev/null +++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-= 3-5 @@ -0,0 +1,30 @@ +pre job bitmap disable: +[ + +] +merge bitmpas: +[ + { + "type": "block-dirty-bitmap-add", + "data": { + "node": "libvirt-5-format", + "name": "b", + "persistent": true, + "disabled": false, + "granularity": 65536 + } + }, + { + "type": "block-dirty-bitmap-merge", + "data": { + "node": "libvirt-5-format", + "target": "b", + "bitmaps": [ + { + "node": "libvirt-3-format", + "name": "b" + } + ] + } + } +] diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-4-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-= broken-4-5 new file mode 100644 index 0000000000..b1f10a8a24 --- /dev/null +++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-synthetic-broken-= 4-5 @@ -0,0 +1,20 @@ +pre job bitmap disable: +[ + { + "type": "block-dirty-bitmap-disable", + "data": { + "node": "libvirt-5-format", + "name": "a" + } + } +] +merge bitmpas: +[ + { + "type": "block-dirty-bitmap-enable", + "data": { + "node": "libvirt-5-format", + "name": "a" + } + } +] --=20 2.24.1