render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
fbe740
From 57911844644ca352154859050e59444aca4e4ca5 Mon Sep 17 00:00:00 2001
fbe740
Message-Id: <57911844644ca352154859050e59444aca4e4ca5@dist-git>
fbe740
From: Peter Krempa <pkrempa@redhat.com>
fbe740
Date: Tue, 23 Jun 2020 12:23:42 +0200
fbe740
Subject: [PATCH] qemublocktest: Add 'empty' case for blockcopy bitmap handling
fbe740
 test
fbe740
MIME-Version: 1.0
fbe740
Content-Type: text/plain; charset=UTF-8
fbe740
Content-Transfer-Encoding: 8bit
fbe740
fbe740
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
fbe740
Reviewed-by: Eric Blake <eblake@redhat.com>
fbe740
(cherry picked from commit 264d7cf444633c0d2d20b30b612754943fede5a3)
fbe740
https://bugzilla.redhat.com/show_bug.cgi?id=1804593
fbe740
Message-Id: <f49b64f231bb06e6d65232aa9bedaf11a5ce4497.1592906423.git.pkrempa@redhat.com>
fbe740
Reviewed-by: Ján Tomko <jtomko@redhat.com>
fbe740
---
fbe740
 tests/qemublocktest.c                                          | 3 +++
fbe740
 tests/qemublocktestdata/bitmapblockcopy/empty-deep-out.json    | 0
fbe740
 tests/qemublocktestdata/bitmapblockcopy/empty-shallow-out.json | 0
fbe740
 3 files changed, 3 insertions(+)
fbe740
 create mode 100644 tests/qemublocktestdata/bitmapblockcopy/empty-deep-out.json
fbe740
 create mode 100644 tests/qemublocktestdata/bitmapblockcopy/empty-shallow-out.json
fbe740
fbe740
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
fbe740
index 5f1c68f6de..2009cad228 100644
fbe740
--- a/tests/qemublocktest.c
fbe740
+++ b/tests/qemublocktest.c
fbe740
@@ -1407,6 +1407,9 @@ mymain(void)
fbe740
             ret = -1; \
fbe740
     } while (0)
fbe740
 
fbe740
+    TEST_BITMAP_BLOCKCOPY("empty-shallow", true, "empty");
fbe740
+    TEST_BITMAP_BLOCKCOPY("empty-deep", false, "empty");
fbe740
+
fbe740
     TEST_BITMAP_BLOCKCOPY("basic-shallow", true, "basic");
fbe740
     TEST_BITMAP_BLOCKCOPY("basic-deep", false, "basic");
fbe740
 
fbe740
diff --git a/tests/qemublocktestdata/bitmapblockcopy/empty-deep-out.json b/tests/qemublocktestdata/bitmapblockcopy/empty-deep-out.json
fbe740
new file mode 100644
fbe740
index 0000000000..e69de29bb2
fbe740
diff --git a/tests/qemublocktestdata/bitmapblockcopy/empty-shallow-out.json b/tests/qemublocktestdata/bitmapblockcopy/empty-shallow-out.json
fbe740
new file mode 100644
fbe740
index 0000000000..e69de29bb2
fbe740
-- 
fbe740
2.27.0
fbe740