OSDN Git Service

qemu-iotests: 067: ignore QMP events
authorSascha Silbe <silbe@linux.vnet.ibm.com>
Fri, 19 Feb 2016 13:01:09 +0000 (14:01 +0100)
committerMax Reitz <mreitz@redhat.com>
Mon, 22 Feb 2016 15:54:14 +0000 (16:54 +0100)
commitf436c94102274f14b556beb655da8a54400e56f3
tree5ec28e43eb7d6de92fdc74e5bef43271686d659d
parent156abc2f901617834307d93f3c066250957f75b1
qemu-iotests: 067: ignore QMP events

The relative ordering of "device_del" return value and the
"DEVICE_DELETED" QMP event depends on the architecture being
tested. On x86 unplugging virtio disks is asynchronous
(=qdev_unplug()= → =hotplug_handler_unplug_request()=) while on s390x
it is synchronous (=qdev_unplug()= → =hotplug_handler_unplug()=). This
leads to the actual output on s390x consistently differing from the
reference output (that was probably produced on x86).

The easiest way to address this is to filter out QMP events in
067. The DEVICE_DELETED event is already getting explicitly tested by
the Python-based test case 139, so the test coverage should be
unaffected. Make use of the recently introduced _filter_qmp_events()
to remove QMP events from the test case output and adjust the
reference output accordingly.

The tr / sed / tr trick used for filtering was suggested by Max Reitz
<mreitz@redhat.com>.

Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
Message-id: 1455886869-139916-2-git-send-email-silbe@linux.vnet.ibm.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
tests/qemu-iotests/067
tests/qemu-iotests/067.out