summaryrefslogtreecommitdiff
path: root/tools/virtio/vringh_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/virtio/vringh_test.c')
-rw-r--r--tools/virtio/vringh_test.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/virtio/vringh_test.c b/tools/virtio/vringh_test.c
index 98ff808d6f0c..b9591223437a 100644
--- a/tools/virtio/vringh_test.c
+++ b/tools/virtio/vringh_test.c
@@ -139,7 +139,7 @@ static int parallel_test(u64 features,
bool fast_vringh)
{
void *host_map, *guest_map;
- int fd, mapsize, to_guest[2], to_host[2];
+ int pipe_ret, fd, mapsize, to_guest[2], to_host[2];
unsigned long xfers = 0, notifies = 0, receives = 0;
unsigned int first_cpu, last_cpu;
cpu_set_t cpu_set;
@@ -161,8 +161,11 @@ static int parallel_test(u64 features,
host_map = mmap(NULL, mapsize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
guest_map = mmap(NULL, mapsize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
- pipe(to_guest);
- pipe(to_host);
+ pipe_ret = pipe(to_guest);
+ assert(!pipe_ret);
+
+ pipe_ret = pipe(to_host);
+ assert(!pipe_ret);
CPU_ZERO(&cpu_set);
find_cpus(&first_cpu, &last_cpu);
@@ -516,7 +519,7 @@ int main(int argc, char *argv[])
errx(1, "virtqueue_add_sgs: %i", err);
__kmalloc_fake = NULL;
- /* Host retreives it. */
+ /* Host retrieves it. */
vringh_iov_init(&riov, host_riov, ARRAY_SIZE(host_riov));
vringh_iov_init(&wiov, host_wiov, ARRAY_SIZE(host_wiov));