|
|
7711c0 |
From 2002520b4c5e6ca74367f9db22a53d5a463b9de2 Mon Sep 17 00:00:00 2001
|
|
|
7711c0 |
From: John Snow <jsnow@redhat.com>
|
|
|
7711c0 |
Date: Wed, 6 Feb 2019 22:12:42 +0100
|
|
|
7711c0 |
Subject: [PATCH 32/33] iotests: improve 169
|
|
|
7711c0 |
|
|
|
7711c0 |
RH-Author: John Snow <jsnow@redhat.com>
|
|
|
7711c0 |
Message-id: <20190206221243.7407-23-jsnow@redhat.com>
|
|
|
7711c0 |
Patchwork-id: 84281
|
|
|
7711c0 |
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v2 22/23] iotests: improve 169
|
|
|
7711c0 |
Bugzilla: 1658343
|
|
|
7711c0 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
Before previous patch, iotest 169 was actually broken for the case
|
|
|
7711c0 |
test_persistent__not_migbitmap__offline_shared, while formally
|
|
|
7711c0 |
passing.
|
|
|
7711c0 |
|
|
|
7711c0 |
After migration log of vm_b had message:
|
|
|
7711c0 |
|
|
|
7711c0 |
qemu-system-x86_64: Could not reopen qcow2 layer: Bitmap already
|
|
|
7711c0 |
exists: bitmap0
|
|
|
7711c0 |
|
|
|
7711c0 |
which means that invalidation failed and bs->drv = NULL.
|
|
|
7711c0 |
|
|
|
7711c0 |
It was because we've loaded bitmap twice: on open and on invalidation.
|
|
|
7711c0 |
|
|
|
7711c0 |
Add code to 169, to catch such fails.
|
|
|
7711c0 |
|
|
|
7711c0 |
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
|
7711c0 |
Signed-off-by: John Snow <jsnow@redhat.com>
|
|
|
7711c0 |
(cherry picked from commit b9247fc1a8ffe5c367fa049f295fbb58c8ca9d05)
|
|
|
7711c0 |
Signed-off-by: John Snow <jsnow@redhat.com>
|
|
|
7711c0 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
---
|
|
|
7711c0 |
tests/qemu-iotests/169 | 9 +++++++++
|
|
|
7711c0 |
1 file changed, 9 insertions(+)
|
|
|
7711c0 |
|
|
|
7711c0 |
diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169
|
|
|
7711c0 |
index df408f8..8b7947d 100755
|
|
|
7711c0 |
--- a/tests/qemu-iotests/169
|
|
|
7711c0 |
+++ b/tests/qemu-iotests/169
|
|
|
7711c0 |
@@ -24,6 +24,7 @@ import time
|
|
|
7711c0 |
import itertools
|
|
|
7711c0 |
import operator
|
|
|
7711c0 |
import new
|
|
|
7711c0 |
+import re
|
|
|
7711c0 |
from iotests import qemu_img
|
|
|
7711c0 |
|
|
|
7711c0 |
|
|
|
7711c0 |
@@ -133,6 +134,14 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase):
|
|
|
7711c0 |
|
|
|
7711c0 |
if should_migrate:
|
|
|
7711c0 |
self.vm_b.shutdown()
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+ # catch 'Could not reopen qcow2 layer: Bitmap already exists'
|
|
|
7711c0 |
+ # possible error
|
|
|
7711c0 |
+ log = self.vm_b.get_log()
|
|
|
7711c0 |
+ log = re.sub(r'^\[I \d+\.\d+\] OPENED\n', '', log)
|
|
|
7711c0 |
+ log = re.sub(r'\[I \+\d+\.\d+\] CLOSED\n?$', '', log)
|
|
|
7711c0 |
+ self.assertEqual(log, '')
|
|
|
7711c0 |
+
|
|
|
7711c0 |
# recreate vm_b, as we don't want -incoming option (this will lead
|
|
|
7711c0 |
# to "cat" process left alive after test finish)
|
|
|
7711c0 |
self.vm_b = iotests.VM(path_suffix='b')
|
|
|
7711c0 |
--
|
|
|
7711c0 |
1.8.3.1
|
|
|
7711c0 |
|