From 12314f2d145c656f0a1f9aebcbe5e21be60c5ca5 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Wed, 23 Aug 2017 15:05:06 +0100 Subject: qemu-iotests: add 194 non-shared storage migration test Non-shared storage migration with NBD and drive-mirror is currently not tested by qemu-iotests. This test case covers the basic migration scenario. Signed-off-by: Stefan Hajnoczi Based-on: <20170823134242.12080-1-famz@redhat.com> Message-Id: <20170823140506.28723-1-stefanha@redhat.com> Tested-by: Eric Blake Signed-off-by: Eric Blake --- tests/qemu-iotests/iotests.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/qemu-iotests/iotests.py') diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 22439c43d3..7233983f3c 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -133,6 +133,14 @@ chown_re = re.compile(r"chown [0-9]+:[0-9]+") def filter_chown(msg): return chown_re.sub("chown UID:GID", msg) +def filter_qmp_event(event): + '''Filter a QMP event dict''' + event = dict(event) + if 'timestamp' in event: + event['timestamp']['seconds'] = 'SECS' + event['timestamp']['microseconds'] = 'USECS' + return event + def log(msg, filters=[]): for flt in filters: msg = flt(msg) @@ -200,6 +208,11 @@ class VM(qtest.QEMUQtestMachine): self._args.append(','.join(opts)) return self + def add_incoming(self, addr): + self._args.append('-incoming') + self._args.append(addr) + return self + def pause_drive(self, drive, event=None): '''Pause drive r/w operations''' if not event: -- cgit v1.2.3-55-g7522