Commit Graph

9 Commits

Author SHA1 Message Date
Marc-André Lureau
35701d818f tests/pipe: add write close/cancel tests
And a few cleanups.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2017-09-04 12:15:40 +02:00
Marc-André Lureau
1dd19d52a3 giopipe: input return 0 and no error when peer is already closed
The peer stream may be closed, but may have failed to close self,
because it has pending operations. In this case indicate EOS on read
rather than returning an error. self will be close eventually on
dispose.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2017-09-04 12:15:36 +02:00
Marc-André Lureau
94527a7e20 test-pipe: /pipe/readcancel is supposed to test cancel
Not to reproduce /pipe/readclose..

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2017-09-04 12:15:34 +02:00
Victor Toso
6f11f55996 tests: fix -Wall -Wextra compiler warnings
With -Wall a few -Wunused-variable and -Wunused-but-set-variable;
With -Wextra lots of -Wunused-parameter and a few -Wsign-compare.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-10-05 14:15:08 +02:00
Victor Toso
70cd7ee210 tests: add test to check for zombie GSources
Using g_pollable_input_stream_create_source to generage several dummy
GSources in order to check if giopipe sets all of them to be dispatched.

This test check for zombie GSources during a write_all/read_chunk
operation.
2015-06-05 09:22:32 +02:00
Victor Toso
b3234ab353 tests: add test to concurrent write to pipe
Concurrent write is not supported and should fail. The GIO error is
G_IO_ERROR_PENDING
2015-06-05 09:22:32 +02:00
Victor Toso
da01ae6622 tests: pipe using _write_all_async function 2015-06-05 09:22:32 +02:00
Victor Toso
e5d2047812 tests: remove read8_cb to use generic read_cb
Both functions are basic the same so let's keep the generic one.
2015-06-05 09:22:32 +02:00
Marc-André Lureau
4e9c936dc2 Add GIOStream-based pipe
This code creates a pipe between 2 GIOStream, the input side read from
the peer output side, and vice-versa.

In the following patches, this will avoid the socket communication
to exchange with the embedded webdav server.

glib-2.0 >= 2.43.90 because GSimpleIOStream dependency.
2015-03-03 14:11:58 +01:00