qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] qtest: fix "device_del" out-of-order events
@ 2017-09-13  9:36 Peter Xu
  2017-09-13  9:36 ` [Qemu-devel] [PATCH 1/4] libqtest: add qmp_device_del() Peter Xu
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Peter Xu @ 2017-09-13  9:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Eric Blake, Markus Armbruster, Fam Zheng,
	Gerd Hoffmann, peterx

It starts from a "make check" failure on one of my private tree. The
problem is that when we do "device_del" we normally looking for two
things: one response (which is mostly empty), and a REMOVE event.  The
tricky point is the event can either be there before/after the empty
response.  So I added qmp_device_del() to make sure the order does not
matter, then use it where proper.

Since I'm at it, I also added the sister helper qmp_device_add(), it
helps to remove LOCs.

I still don't 100% sure why my private tree can trigger this error,
while the master cannot. Anyway, I think this is something we should
have, no matter what.

Please review.  Thanks.

Peter Xu (4):
  libqtest: add qmp_device_del()
  tests: use qmp_device_del() where proper
  libqtest: add qmp_device_add()
  tests: use qmp_device_add() where proper

 tests/libqos/pci.c        | 15 +++--------
 tests/libqos/usb.c        | 28 +++++----------------
 tests/libqtest.c          | 63 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/libqtest.h          | 17 +++++++++++++
 tests/usb-hcd-uhci-test.c | 28 +++------------------
 tests/usb-hcd-xhci-test.c | 52 ++++----------------------------------
 6 files changed, 97 insertions(+), 106 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-10-02 17:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-13  9:36 [Qemu-devel] [PATCH 0/4] qtest: fix "device_del" out-of-order events Peter Xu
2017-09-13  9:36 ` [Qemu-devel] [PATCH 1/4] libqtest: add qmp_device_del() Peter Xu
2017-10-02 17:25   ` Markus Armbruster
2017-10-02 17:33     ` Eric Blake
2017-09-13  9:36 ` [Qemu-devel] [PATCH 2/4] tests: use qmp_device_del() where proper Peter Xu
2017-09-13  9:36 ` [Qemu-devel] [PATCH 3/4] libqtest: add qmp_device_add() Peter Xu
2017-09-13 10:01   ` Thomas Huth
2017-09-13  9:36 ` [Qemu-devel] [PATCH 4/4] tests: use qmp_device_add() where proper Peter Xu
2017-09-13  9:53 ` [Qemu-devel] [PATCH 0/4] qtest: fix "device_del" out-of-order events Thomas Huth
2017-09-13 10:28   ` Peter Xu
2017-09-13 10:35     ` Thomas Huth
2017-09-13 10:42       ` Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).