[Spice-devel] [PATCH spice-gtk 1/5] test-pipe: /pipe/readcancel is supposed to test cancel

marcandre.lureau at redhat.com marcandre.lureau at redhat.com
Thu Aug 17 13:35:53 UTC 2017


From: Marc-André Lureau <marcandre.lureau at redhat.com>

Not to reproduce /pipe/readclose..

Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
 tests/pipe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/pipe.c b/tests/pipe.c
index 7a0dafd..a25e79b 100644
--- a/tests/pipe.c
+++ b/tests/pipe.c
@@ -250,7 +250,7 @@ readcancel_cb(GObject *source, GAsyncResult *result, gpointer user_data)
     nbytes = g_input_stream_read_finish(G_INPUT_STREAM(source), result, &error);
 
     g_assert_cmpint(nbytes, ==, -1);
-    g_assert_error(error, G_IO_ERROR, G_IO_ERROR_CLOSED);
+    g_assert_error(error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
     g_clear_error(&error);
 
     g_main_loop_quit (loop);
@@ -263,7 +263,7 @@ test_pipe_readcancel(Fixture *f, gconstpointer user_data G_GNUC_UNUSED)
 
     g_input_stream_read_async(f->ip2, f->buf, 1, G_PRIORITY_DEFAULT,
                               f->cancellable, readcancel_cb, f->loop);
-    g_output_stream_close(f->op1, f->cancellable, &error);
+    g_cancellable_cancel(f->cancellable);
 
     g_main_loop_run (f->loop);
 }
-- 
2.14.0.1.geff633fa0



More information about the Spice-devel mailing list