tests: virtio-9p: wait for completion in the test code
commit60b1fa9de1513713807b49be8a9f25077d5ab2ed
authorGreg Kurz <groug@kaod.org>
Thu, 1 Feb 2018 20:21:27 +0000 (1 21:21 +0100)
committerGreg Kurz <groug@kaod.org>
Thu, 1 Feb 2018 20:21:27 +0000 (1 21:21 +0100)
tree88210be601a1d6d5e68f746ba89305511c09c559
parent693b21d2c7e54474017a4b45d36faa767279d4d4
tests: virtio-9p: wait for completion in the test code

In order to test request cancellation, we will need to send multiple
requests and wait for the associated replies. Since we poll the ISR
to know if a request completed, we may have several replies to parse
when we detect ISR was set to 1.

This patch moves the waiting out of the reply parsing path, up into
the functional tests.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/virtio-9p-test.c