OSDN Git Service

tests: Use qpci_mem{read,write} in ivshmem-test
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 18 Oct 2016 05:18:45 +0000 (16:18 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 27 Oct 2016 22:38:27 +0000 (09:38 +1100)
commit204e54b86d123d091f0b2d14541c491ece7b864f
treef969df3316bc20d5619404995ae652a3b2710051
parentf775f45ab866f8e2d26720de9cb3c8f0ba5684d3
tests: Use qpci_mem{read,write} in ivshmem-test

ivshmem implements a block of shared memory in a PCI BAR.  Currently our
test case accesses this using qtest_mem{read,write}.  However, deducing
the correct addresses for these requires making assumptions about the
internel format returned by qpci_iomap(), along with some ugly casts.

This patch changes the test to use the new qpci_mem{read,write} interfaces
which is neater.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
tests/ivshmem-test.c