From nobody Fri Dec 19 21:57:56 2025 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=1592241088; cv=none; d=zohomail.com; s=zohoarc; b=A5gcB/kodWj95APA+83pFodMpLDsWcxste/18BcYSefuXWZXxTuz4OPJy7Y6OMzu3pT8bTG/cn7gGmF/TdU8bmiHwDf94Fgw9Yfr3aE64q2Dv0REJHn6h0UfbbANIfdStwAjGoWtc1Tx3mgII6SjSaDFeQMa61QIfG7qPCGeIPQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592241088; 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=m7xHITKypdvtTPs6v3LOOWpxt8egrXUTxQbdnTYfyag=; b=M+adS/OA+jH3qrE+g0k0khdOTzU/uloZOx55ojPqTcPhvgJ5kSlfkPrnvOb50VYqEP78/YwT7/z58in8lOuZTkonDS3Bs8Fajb/kBk5870lhWoKNczScAfrBO6s5RJMUcC6Tc4VQIX9NR7KTBxT8JfHOiMLJoF5zPtfRPhXmAe4= 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 1592241088867879.1800881324317; Mon, 15 Jun 2020 10:11:28 -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-296-AGaqyF5nN5mpMiEceR7bsw-1; Mon, 15 Jun 2020 13:11:24 -0400 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 2E71C873410; Mon, 15 Jun 2020 17:11:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 031E361983; Mon, 15 Jun 2020 17:11:18 +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 C4375180530C; Mon, 15 Jun 2020 17:11:17 +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 05FHASwJ004667 for ; Mon, 15 Jun 2020 13:10:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6FE991002394; Mon, 15 Jun 2020 17:10:28 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id D0AE9100164D for ; Mon, 15 Jun 2020 17:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592241087; 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=m7xHITKypdvtTPs6v3LOOWpxt8egrXUTxQbdnTYfyag=; b=E7rFGcWz+PLLm3uimY++WQc2DrLNS+2grPr0gyw0jVquhe9pV8QMAJTkQsByaq2wbb9eT5 GjBMXVonXRNfQj4Uj0QjQ241Czca1qup8GNFCshuTxIhqkdAIuhAETYxReQlWRZ/udweJR 9mVO3jceOWJZLlKbCEtkiHfcuPbNeRU= X-MC-Unique: AGaqyF5nN5mpMiEceR7bsw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 05/32] qemublocktest: Add 'empty' test case for bitmaps Date: Mon, 15 Jun 2020 19:09:52 +0200 Message-Id: <77f93a09e9203a6946fe0557ca4e1144dba65175.1592240635.git.pkrempa@redhat.com> 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.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" Add test data for an image without bitmaps. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- tests/qemublocktest.c | 4 ++ tests/qemublocktestdata/bitmap/empty.json | 70 +++++++++++++++++++++++ tests/qemublocktestdata/bitmap/empty.out | 1 + 3 files changed, 75 insertions(+) create mode 100644 tests/qemublocktestdata/bitmap/empty.json create mode 100644 tests/qemublocktestdata/bitmap/empty.out diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index f00d2ff129..8d613d7cac 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -1292,6 +1292,8 @@ mymain(void) ret =3D -1; \ } while (0) + TEST_BITMAP_DETECT("empty"); + TEST_BITMAP_DETECT("basic"); TEST_BITMAP_DETECT("synthetic"); TEST_BITMAP_DETECT("snapshots"); @@ -1360,6 +1362,8 @@ mymain(void) ret =3D -1; \ } while (0) + TEST_BITMAP_VALIDATE("empty", "a", false); + TEST_BITMAP_VALIDATE("basic", "a", true); TEST_BITMAP_VALIDATE("basic", "b", true); TEST_BITMAP_VALIDATE("basic", "c", true); diff --git a/tests/qemublocktestdata/bitmap/empty.json b/tests/qemublocktes= tdata/bitmap/empty.json new file mode 100644 index 0000000000..ec43b25f0d --- /dev/null +++ b/tests/qemublocktestdata/bitmap/empty.json @@ -0,0 +1,70 @@ +[ + { + "iops_rd": 0, + "detect_zeroes": "off", + "image": { + "virtual-size": 10485760, + "filename": "/tmp/pull4.qcow2", + "cluster-size": 65536, + "format": "qcow2", + "actual-size": 200704, + "format-specific": { + "type": "qcow2", + "data": { + "compat": "1.1", + "lazy-refcounts": false, + "refcount-bits": 16, + "corrupt": false + } + }, + "dirty-flag": false + }, + "iops_wr": 0, + "ro": false, + "node-name": "libvirt-1-format", + "backing_file_depth": 0, + "drv": "qcow2", + "iops": 0, + "bps_wr": 0, + "write_threshold": 0, + "encrypted": false, + "bps": 0, + "bps_rd": 0, + "cache": { + "no-flush": false, + "direct": false, + "writeback": true + }, + "file": "/tmp/pull4.qcow2", + "encryption_key_missing": false + }, + { + "iops_rd": 0, + "detect_zeroes": "off", + "image": { + "virtual-size": 197120, + "filename": "/tmp/pull4.qcow2", + "format": "file", + "actual-size": 200704, + "dirty-flag": false + }, + "iops_wr": 0, + "ro": false, + "node-name": "libvirt-1-storage", + "backing_file_depth": 0, + "drv": "file", + "iops": 0, + "bps_wr": 0, + "write_threshold": 0, + "encrypted": false, + "bps": 0, + "bps_rd": 0, + "cache": { + "no-flush": false, + "direct": false, + "writeback": true + }, + "file": "/tmp/pull4.qcow2", + "encryption_key_missing": false + } +] diff --git a/tests/qemublocktestdata/bitmap/empty.out b/tests/qemublocktest= data/bitmap/empty.out new file mode 100644 index 0000000000..3787cbd354 --- /dev/null +++ b/tests/qemublocktestdata/bitmap/empty.out @@ -0,0 +1 @@ +libvirt-1-format: --=20 2.26.2