> > Check that two consecutive msgfd are read back from two different reads. > > Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxx> > --- > server/tests/stream-test.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/server/tests/stream-test.c b/server/tests/stream-test.c > index 7dc9fbf..f83f0e1 100644 > --- a/server/tests/stream-test.c > +++ b/server/tests/stream-test.c > @@ -111,6 +111,22 @@ int main(int argc, char *argv[]) > spice_assert(ret == 1); > spice_assert(fd == -1); > > + /* batch test */ > + ret = reds_stream_send_msgfd(st[0], 0); > + spice_assert(ret == 1); > + ret = reds_stream_send_msgfd(st[0], 0); > + spice_assert(ret == 1); > + ret = sock_fd_read(sv[1], &c, 1, &fd); > + spice_assert(c == '@'); > + spice_assert(ret == 1); > + spice_assert(fd != -1); > + close(fd); > + ret = sock_fd_read(sv[1], &c, 1, &fd); > + spice_assert(c == '@'); > + spice_assert(ret == 1); > + spice_assert(fd != -1); > + close(fd); > + > reds_stream_free(st[0]); > reds_stream_free(st[1]); > Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx> Frediano _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel