[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH for-3.0 6/7] iotests: improve 169
From: |
John Snow |
Subject: |
[Qemu-block] [PATCH for-3.0 6/7] iotests: improve 169 |
Date: |
Mon, 23 Jul 2018 18:22:09 -0400 |
From: Vladimir Sementsov-Ogievskiy <address@hidden>
Before previous patch, iotest 169 was actually broken for the case
test_persistent__not_migbitmap__offline_shared, while formally
passing.
After migration log of vm_b had message:
qemu-system-x86_64: Could not reopen qcow2 layer: Bitmap already
exists: bitmap0
which means that invalidation failed and bs->drv = NULL.
It was because we've loaded bitmap twice: on open and on invalidation.
Add code to 169, to catch such fails.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: John Snow <address@hidden>
---
tests/qemu-iotests/169 | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169
index 87edc85f43..24027da8e1 100755
--- a/tests/qemu-iotests/169
+++ b/tests/qemu-iotests/169
@@ -24,6 +24,7 @@ import time
import itertools
import operator
import new
+import re
from iotests import qemu_img
@@ -136,6 +137,16 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase):
if should_migrate:
self.vm_b.shutdown()
+
+ # catch 'Could not reopen qcow2 layer: Bitmap already exists'
+ # possible error
+ log = self.vm_b.get_log()
+ log = re.sub(r'^\[I \d+\.\d+\] OPENED\n', '', log)
+ log = re.sub(r'Receiving block device images\n', '', log)
+ log = re.sub(r'Completed \d+ %\r?\n?', '', log)
+ log = re.sub(r'\[I \+\d+\.\d+\] CLOSED\n?$', '', log)
+ self.assertEqual(log, '')
+
# recreate vm_b, as we don't want -incoming option (this will lead
# to "cat" process left alive after test finish)
self.vm_b = iotests.VM(path_suffix='b')
--
2.14.4
- [Qemu-block] [PATCH for-3.0 0/7] fix persistent bitmaps migration logic, John Snow, 2018/07/23
- [Qemu-block] [PATCH for-3.0 4/7] iotests: 169: actually test block migration, John Snow, 2018/07/23
- [Qemu-block] [PATCH for-3.0 6/7] iotests: improve 169,
John Snow <=
- [Qemu-block] [PATCH for-3.0 3/7] block/qcow2: drop dirty_bitmaps_loaded state variable, John Snow, 2018/07/23
- [Qemu-block] [PATCH for-3.0 1/7] iotests: 169: drop deprecated 'autoload' parameter, John Snow, 2018/07/23
- [Qemu-block] [PATCH for-3.0 5/7] dirty-bitmaps: clean-up bitmaps loading and migration logic, John Snow, 2018/07/23
- [Qemu-block] [PATCH for-3.0 2/7] block/qcow2: improve error message in qcow2_inactivate, John Snow, 2018/07/23
- [Qemu-block] [PATCH for-3.0 7/7] iotests: 169: add cases for source vm resuming, John Snow, 2018/07/23
- Re: [Qemu-block] [PATCH for-3.0 0/7] fix persistent bitmaps migration logic, Stefan Hajnoczi, 2018/07/24
- Re: [Qemu-block] [Qemu-devel] [PATCH for-3.0 0/7] fix persistent bitmaps migration logic, Michael Roth, 2018/07/30