|
|
d76c62 |
From a0a2e4eaa6ab0b6435286f9af6e7026f0000b9e5 Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <a0a2e4eaa6ab0b6435286f9af6e7026f0000b9e5@dist-git>
|
|
|
d76c62 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Date: Mon, 16 Mar 2020 22:12:23 +0100
|
|
|
d76c62 |
Subject: [PATCH] qemublocktest: Fix and optimize fake image chain
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
Set the 'id' field of the backing chain properly so that we can look
|
|
|
d76c62 |
up images, and initialize 6 images instead of 10 as we don't use more
|
|
|
d76c62 |
currently.
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
d76c62 |
(cherry picked from commit f8389505aae66e705046f5cbd9fe4ac10f1dee2e)
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1799013
|
|
|
d76c62 |
Message-Id: <c45885fd70242874545a5c8129bcb52022014112.1584391727.git.pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
tests/qemublocktest.c | 3 ++-
|
|
|
d76c62 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
|
|
|
d76c62 |
index f48875e16d..6ccc2328b3 100644
|
|
|
d76c62 |
--- a/tests/qemublocktest.c
|
|
|
d76c62 |
+++ b/tests/qemublocktest.c
|
|
|
d76c62 |
@@ -636,6 +636,7 @@ testQemuBackupIncrementalBitmapCalculateGetFakeImage(size_t idx)
|
|
|
d76c62 |
if (!(ret = virStorageSourceNew()))
|
|
|
d76c62 |
abort();
|
|
|
d76c62 |
|
|
|
d76c62 |
+ ret->id = idx;
|
|
|
d76c62 |
ret->type = VIR_STORAGE_TYPE_FILE;
|
|
|
d76c62 |
ret->format = VIR_STORAGE_FILE_QCOW2;
|
|
|
d76c62 |
ret->path = g_strdup_printf("/image%zu", idx);
|
|
|
d76c62 |
@@ -655,7 +656,7 @@ testQemuBackupIncrementalBitmapCalculateGetFakeChain(void)
|
|
|
d76c62 |
|
|
|
d76c62 |
n = ret = testQemuBackupIncrementalBitmapCalculateGetFakeImage(1);
|
|
|
d76c62 |
|
|
|
d76c62 |
- for (i = 2; i < 10; i++) {
|
|
|
d76c62 |
+ for (i = 2; i < 6; i++) {
|
|
|
d76c62 |
n->backingStore = testQemuBackupIncrementalBitmapCalculateGetFakeImage(i);
|
|
|
d76c62 |
n = n->backingStore;
|
|
|
d76c62 |
}
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.25.1
|
|
|
d76c62 |
|