diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2017-08-23 15:05:06 +0100 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2017-08-23 10:21:55 -0500 |
commit | 12314f2d145c656f0a1f9aebcbe5e21be60c5ca5 (patch) | |
tree | df29a5cbd766f1f16009ac96e4510b064cf9edb9 /tests/qemu-iotests/iotests.py | |
parent | 7d5b5261104235cd6cc86930ab0d0a7372bfe04b (diff) |
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 <stefanha@redhat.com>
Based-on: <20170823134242.12080-1-famz@redhat.com>
Message-Id: <20170823140506.28723-1-stefanha@redhat.com>
Tested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/iotests.py')
-rw-r--r-- | tests/qemu-iotests/iotests.py | 13 |
1 files changed, 13 insertions, 0 deletions
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: |