ivshmem-test: Clean up wait for devices to become operational
commit14c5d49ab39fe767c39b8adce9bee5494063d56a
authorMarkus Armbruster <armbru@redhat.com>
Tue, 15 Mar 2016 18:34:23 +0000 (15 19:34 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 21 Mar 2016 20:28:59 +0000 (21 21:28 +0100)
treec05cbf14c5382ddc504143279f75e433c31876f0
parent4958fe5d3c77a40a5250bc820b582a29d73605ab
ivshmem-test: Clean up wait for devices to become operational

test_ivshmem_server() waits until the first byte in BAR 2 contains the
0x42 we put into shared memory.  Works because the byte reads zero
until the device maps the shared memory gotten from the server.

Check the IVPosition register instead: it's initially -1, and becomes
non-negative right when the device maps the share memory, so no
change, just cleaner, because it's what guest software is supposed to
do.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1458066895-20632-9-git-send-email-armbru@redhat.com>
tests/ivshmem-test.c