diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2020-11-16 10:22:33 -0500 |
---|---|---|
committer | Thanos <tmakatos@gmail.com> | 2020-11-18 16:50:58 +0000 |
commit | d477770fb2fbefa1c1a7a067125891956c525d47 (patch) | |
tree | 9880a7cb62b5e06f100efa8b7c067420ed3563be /samples/client.c | |
parent | 943fe77b8099d4a9c5423320dc471a4ac14c634b (diff) | |
download | libvfio-user-d477770fb2fbefa1c1a7a067125891956c525d47.zip libvfio-user-d477770fb2fbefa1c1a7a067125891956c525d47.tar.gz libvfio-user-d477770fb2fbefa1c1a7a067125891956c525d47.tar.bz2 |
don't assert on error, instead respond with the relevant bit set
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples/client.c')
-rw-r--r-- | samples/client.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/samples/client.c b/samples/client.c index bd8d2b3..afed47a 100644 --- a/samples/client.c +++ b/samples/client.c @@ -905,6 +905,14 @@ int main(int argc, char *argv[]) ret = migrate_from(sock); } + /* + * Try to touch BAR0, we should get an error as the device is stopped. + */ + ret = access_bar0(sock); + if (ret != EINVAL) { + fprintf(stderr, "expected an error, got %d instead\n", ret); + } + return 0; } |