aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2020-12-01 07:37:07 -0500
committerThanos <tmakatos@gmail.com>2020-12-01 15:41:25 +0000
commit50f21d54d5ea96703afb466a2d2a7c805aba3f59 (patch)
treee77238fa3e5b7757da6896262ca58bd100a007bb /test
parente68ae954776a048838be74f0bc049205acfeb878 (diff)
downloadlibvfio-user-50f21d54d5ea96703afb466a2d2a7c805aba3f59.zip
libvfio-user-50f21d54d5ea96703afb466a2d2a7c805aba3f59.tar.gz
libvfio-user-50f21d54d5ea96703afb466a2d2a7c805aba3f59.tar.bz2
make consume_fd to return the fd it consumes
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'test')
-rw-r--r--test/unit-tests.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit-tests.c b/test/unit-tests.c
index 17f1dad..306f70a 100644
--- a/test/unit-tests.c
+++ b/test/unit-tests.c
@@ -98,7 +98,7 @@ test_dma_map_without_fd(void **state __attribute__((unused)))
}
/*
- * Tests that adding multiple DMA regions where not all of them are mappable
+ * Tests that adding multiple DMA regions that not all of them are mappable
* results in only the mappable one being memory mapped.
*/
static void
@@ -120,7 +120,7 @@ test_dma_add_regions_mixed(void **state __attribute__((unused)))
.flags = VFIO_USER_F_DMA_REGION_MAPPABLE
}
};
- int fd = 0x8badf00d;
+ int fd = 0x0badf00d;
patch(dma_controller_add_region);
will_return(__wrap_dma_controller_add_region, 0);
@@ -168,7 +168,7 @@ test_dma_add_regions_mixed_partial_failure(void **state __attribute__((unused)))
.flags = VFIO_USER_F_DMA_REGION_MAPPABLE
}
};
- int fds[] = {0x8badf00d, 0xbad8f00d};
+ int fds[] = {0xa, 0xb};
patch(dma_controller_add_region);