[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 05/11] iotests: allow resume_drive by node name
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[Qemu-devel] [PATCH v5 05/11] iotests: allow resume_drive by node name |
Date: |
Sat, 29 Dec 2018 15:20:21 +0300 |
After node graph changes, we may not be able to resume_drive by device
name (backing files are not recursively searched). So, lets allow to
resume by node-name. Set constant name for breakpoints, to avoid
introducing extra parameters.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
tests/qemu-iotests/iotests.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 76877ad584..c9779f432f 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -415,11 +415,11 @@ class VM(qtest.QEMUQtestMachine):
self.pause_drive(drive, "write_aio")
return
self.qmp('human-monitor-command',
- command_line='qemu-io %s "break %s bp_%s"' % (drive,
event, drive))
+ command_line='qemu-io %s "break %s bp_0"' % (drive, event))
def resume_drive(self, drive):
self.qmp('human-monitor-command',
- command_line='qemu-io %s "remove_break bp_%s"' % (drive,
drive))
+ command_line='qemu-io %s "remove_break bp_0"' % (drive))
def hmp_qemu_io(self, drive, cmd):
'''Write to a given drive using an HMP command'''
@@ -543,13 +543,14 @@ class QMPTestCase(unittest.TestCase):
self.assertEqual(self.vm.flatten_qmp_object(json.loads(json_filename[5:])),
self.vm.flatten_qmp_object(reference))
- def cancel_and_wait(self, drive='drive0', force=False, resume=False):
+ def cancel_and_wait(self, drive='drive0', force=False, resume=False,
+ resume_node=None):
'''Cancel a block job and wait for it to finish, returning the event'''
result = self.vm.qmp('block-job-cancel', device=drive, force=force)
self.assert_qmp(result, 'return', {})
if resume:
- self.vm.resume_drive(drive)
+ self.vm.resume_drive(resume_node or drive)
cancelled = False
result = None
--
2.18.0
- [Qemu-devel] [PATCH v5 00/11] backup-top filter driver for backup, Vladimir Sementsov-Ogievskiy, 2018/12/29
- [Qemu-devel] [PATCH v5 07/11] block: introduce backup-top filter driver, Vladimir Sementsov-Ogievskiy, 2018/12/29
- [Qemu-devel] [PATCH v5 10/11] block/backup: tiny refactor backup_job_create, Vladimir Sementsov-Ogievskiy, 2018/12/29
- [Qemu-devel] [PATCH v5 05/11] iotests: allow resume_drive by node name,
Vladimir Sementsov-Ogievskiy <=
- [Qemu-devel] [PATCH v5 11/11] block/backup: use backup-top instead of write notifiers, Vladimir Sementsov-Ogievskiy, 2018/12/29
- [Qemu-devel] [PATCH v5 02/11] block/backup: move to copy_bitmap with granularity, Vladimir Sementsov-Ogievskiy, 2018/12/29
- [Qemu-devel] [PATCH v5 09/11] block: add lock/unlock range functions, Vladimir Sementsov-Ogievskiy, 2018/12/29
- [Qemu-devel] [PATCH v5 06/11] iotests: prepare 055 to graph changes during backup job, Vladimir Sementsov-Ogievskiy, 2018/12/29
- [Qemu-devel] [PATCH v5 04/11] iotests: handle -f argument correctly for qemu_io_silent, Vladimir Sementsov-Ogievskiy, 2018/12/29
- [Qemu-devel] [PATCH v5 03/11] block: improve should_update_child, Vladimir Sementsov-Ogievskiy, 2018/12/29
- [Qemu-devel] [PATCH v5 08/11] block/io: refactor wait_serialising_requests, Vladimir Sementsov-Ogievskiy, 2018/12/29
- [Qemu-devel] [PATCH v5 01/11] block/backup: simplify backup_incremental_init_copy_bitmap, Vladimir Sementsov-Ogievskiy, 2018/12/29