Commit Graph

5 Commits

Author SHA1 Message Date
Frediano Ziglio
fa0c32f120 remove a warning building a test
With my compile switches (which are mostly derived from RedHat spec
file) I'm getting this warning:

stream-test.c: In function 'sock_fd_read':
stream-test.c:66:43: warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing]
             *fd = *((int *) CMSG_DATA(cmsg));
                                           ^

memcpy could decrease performance but as this is a test it's not
an issue.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-18 14:52:10 +01:00
Frediano Ziglio
1e4800507b use #include<> style for spice-common header inclusions.
The include directory is specified with the -I which is the directory
used directly by #include<>.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-05-09 12:45:27 +01:00
Jonathon Jongsma
de2572815b Add RedsState reference to RedsStream
Allows us to remove use of global 'reds' variable from reds-stream.c.
Requires changing the RedsStream constructor to accept a RedsState arg.

Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-02-16 10:45:46 +00:00
Marc-Andre Lureau
47df90a8ce stream-test: add batch test
Check that two consecutive msgfd are read back from two different reads.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-01-15 11:04:30 +00:00
Marc-Andre Lureau
f438bd6ae9 tests: add fdpass stream test
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-01-14 11:04:49 +00:00