test-aio: Fix event notifier cleanup
authorKevin Wolf <kwolf@redhat.com>
Mon, 23 Nov 2015 12:30:23 +0000 (13:30 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 25 Nov 2015 13:27:43 +0000 (14:27 +0100)
One test case closed an event notifier (event_notifier_cleanup())
without first disabling it (set_event_notifier(..., NULL)). This
resulted in a leftover handle 0 that was added to each subsequent
WaitForMultipleObjects() call, causing the function to fail (invalid
handle).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/test-aio.c

index 1623803e8c979ab8a554a10a07ebfc671840a990..e188d8c13d0f2080eec3d9f26c5ae22a65365318 100644 (file)
@@ -393,6 +393,7 @@ static void test_aio_external_client(void)
             aio_enable_external(ctx);
         }
         assert(aio_poll(ctx, false));
+        set_event_notifier(ctx, &data.e, NULL);
         event_notifier_cleanup(&data.e);
     }
 }