From d477770fb2fbefa1c1a7a067125891956c525d47 Mon Sep 17 00:00:00 2001 From: Thanos Makatos Date: Mon, 16 Nov 2020 10:22:33 -0500 Subject: don't assert on error, instead respond with the relevant bit set Signed-off-by: Thanos Makatos --- samples/client.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'samples/client.c') 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; } -- cgit v1.1