[Spice-devel] [PATCH spice-server v6 06/10] test-sasl: Test how to server reports the failure

2018-01-08 Thread Frediano Ziglio
The server on failure can just disconnect the client or report the error. The error report can be done using new protocol 2 or just a number (like protocol 1). Detect the failure report to make possible to check it. Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c

[Spice-devel] [PATCH spice-server v6 05/10] test-sasl: Add tests for different failures and cases

2018-01-08 Thread Frediano Ziglio
Use some flags to specify which behaviour to change and different test cases to test them. Some cases specify when client stop sending data at different steps of the process. Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c | 171

[Spice-devel] [PATCH spice-server v6 10/10] red-stream: Encapsulate all authentication state in RedSASLAuth

2018-01-08 Thread Frediano Ziglio
Instead of having half state in RedSASL and half in RedSASLAuth move everything in RedSASLAuth. This also reduces memory usage when we are using SASL but we finish the authentication step. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 129

[Spice-devel] [PATCH spice-server v6 03/10] test-sasl: Base test, connect using SASL

2018-01-08 Thread Frediano Ziglio
Create a thread that emulates a client and starts SASL authentication Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c | 237 ++- 1 file changed, 236 insertions(+), 1 deletion(-) diff --git a/server/tests/test-sasl.c

[Spice-devel] [PATCH spice-server v6 08/10] red-stream: Handle properly endianness in SASL code

2018-01-08 Thread Frediano Ziglio
All SPICE protocol is little endian, there's no agreement on other endian and currently we support only little endian so make sure this will work even possibly running on a big endian machine. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 28

[Spice-devel] [PATCH spice-server v6 9/9] red-stream: Encapsulate all authentication state in RedSASLAuth

2018-01-08 Thread Frediano Ziglio
Instead of having half state in RedSASL and half in RedSASLAuth move everything in RedSASLAuth. This also reduces memory usage when we are using SASL but we finish the authentication step. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 129

[Spice-devel] [PATCH spice-server v6 6/9] Handle SASL initialisation mainly in red-stream.c

2018-01-08 Thread Frediano Ziglio
Asynchronous code jumping from a file to another is tedious to read also having code handling the same stuff in two files does not look a good design. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 121 +---

[Spice-devel] [PATCH spice-server v6 02/10] test-sasl: Add code to mocking functions to test state

2018-01-08 Thread Frediano Ziglio
Check some functions are called in a given sequence. Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/server/tests/test-sasl.c b/server/tests/test-sasl.c index 0e4c633c..85332974 100644 ---

[Spice-devel] [PATCH spice-server v6 01/10] test-sasl: Initial SASL test

2018-01-08 Thread Frediano Ziglio
Not currently working, is defining SASL functions used by the code. As the symbols defined in the objects have more priority than the ones defined by the libraries these function take precedence compared to system library. Signed-off-by: Frediano Ziglio --- configure.ac

[Spice-devel] [PATCH spice-server v6 7/9] red-stream: Handle properly endianness in SASL code

2018-01-08 Thread Frediano Ziglio
All SPICE protocol is little endian, there's no agreement on other endian and currently we support only little endian so make sure this will work even possibly running on a big endian machine. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 28

[Spice-devel] [PATCH spice-server v6 5/9] test-sasl: Test how to server reports the failure

2018-01-08 Thread Frediano Ziglio
The server on failure can just disconnect the client or report the error. The error report can be done using new protocol 2 or just a number (like protocol 1). Detect the failure report to make possible to check it. Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c

[Spice-devel] [PATCH spice-server v6 04/10] test-sasl: Add tests for different mechanism names

2018-01-08 Thread Frediano Ziglio
Try different connections with different tricky names. Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c | 82 +--- 1 file changed, 71 insertions(+), 11 deletions(-) diff --git a/server/tests/test-sasl.c

[Spice-devel] [PATCH spice-server v6 07/10] Handle SASL initialisation mainly in red-stream.c

2018-01-08 Thread Frediano Ziglio
Asynchronous code jumping from a file to another is tedious to read also having code handling the same stuff in two files does not look a good design. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 121 +---

[Spice-devel] [PATCH spice-server v6 8/9] red-stream: Unify start and step passes

2018-01-08 Thread Frediano Ziglio
Most of these function are identical. Only difference were basically debugging message but now with a proper tests are less important. The mechname field is used to differentiate between first step and following ones. Signed-off-by: Frediano Ziglio --- server/red-stream.c |

[Spice-devel] [PATCH spice-server v6 09/10] red-stream: Unify start and step passes

2018-01-08 Thread Frediano Ziglio
Most of these function are identical. Only difference were basically debugging message but now with a proper tests are less important. The mechname field is used to differentiate between first step and following ones. Signed-off-by: Frediano Ziglio --- server/red-stream.c |

[Spice-devel] [PATCH spice-server v6 00/10] SASL code improvements

2018-01-08 Thread Frediano Ziglio
SASL authentication code were a bit dodgy to see. The series have 2 parts: - a test for SASL code; - some code refactory. Test is not that straightforward, maybe some code should be put in different files. On the other end I don't think the code that is mocking SASL will be reused in other tests.

[Spice-devel] [PATCH spice-server v5 02/10] test-sasl: Add code to mocking functions to test state

2018-01-08 Thread Frediano Ziglio
Check some functions are called in a given sequence. Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/server/tests/test-sasl.c b/server/tests/test-sasl.c index 0e4c633c..85332974 100644 ---

[Spice-devel] [PATCH spice-server v5 05/10] test-sasl: Add tests for different failures and cases

2018-01-08 Thread Frediano Ziglio
Use some flags to specify which behaviour to change and different test cases to test them. Some cases specify when client stop sending data at different steps of the process. Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c | 232

[Spice-devel] [PATCH spice-server v5 00/10] SASL code improvements

2018-01-08 Thread Frediano Ziglio
SASL authentication code were a bit dodgy to see. The series have basically 3 parts: - some minor fixes; - a test for SASL code; - some code refactory. The fixes were handling issues discovered looking at code and writing the tests. Test is not that straightforward, maybe some code should be put

[Spice-devel] [PATCH spice-server v5 04/10] test-sasl: Add tests for different mechanism names

2018-01-08 Thread Frediano Ziglio
Try different connections with different tricky names. Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c | 77 ++-- 1 file changed, 68 insertions(+), 9 deletions(-) diff --git a/server/tests/test-sasl.c

[Spice-devel] [PATCH spice-server v5 09/10] red-stream: Unify start and step passes

2018-01-08 Thread Frediano Ziglio
Most of these function are identical. Only difference were basically debugging message but now with a proper tests are less important. The mechname field is used to differentiate between first step and following ones. Signed-off-by: Frediano Ziglio --- server/red-stream.c |

[Spice-devel] [PATCH spice-server v5 08/10] red-stream: Handle properly endianness in SASL code

2018-01-08 Thread Frediano Ziglio
All SPICE protocol is little endian, there's no agreement on other endian and currently we support only little endian so make sure this will work even possibly running on a big endian machine. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 28

[Spice-devel] [PATCH spice-server v5 03/10] test-sasl: Base test, connect using SASL

2018-01-08 Thread Frediano Ziglio
Create a thread that emulates a client and starts SASL authentication Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c | 237 ++- 1 file changed, 236 insertions(+), 1 deletion(-) diff --git a/server/tests/test-sasl.c

[Spice-devel] [PATCH spice-server v5 06/10] test-sasl: Test how to server reports the failure

2018-01-08 Thread Frediano Ziglio
The server on failure can just disconnect the client or report the error. The error report can be done using new protocol 2 or just a number (like protocol 1). Detect the failure report to make possible to check it. Signed-off-by: Frediano Ziglio --- server/tests/test-sasl.c

[Spice-devel] [PATCH spice-server v5 07/10] Handle SASL initialisation mainly in red-stream.c

2018-01-08 Thread Frediano Ziglio
Asynchronous code jumping from a file to another is tedious to read also having code handling the same stuff in two files does not look a good design. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 121 +---

[Spice-devel] [PATCH spice-server v5 01/10] test-sasl: Initial SASL test

2018-01-08 Thread Frediano Ziglio
Not currently working, is defining SASL functions used by the code. As the symbols defined in the objects have more priority than the ones defined by the libraries these function take precedence compared to system library. Signed-off-by: Frediano Ziglio --- configure.ac

[Spice-devel] [PATCH spice-server v5 10/10] red-stream: Encapsulate all authentication state in RedSASLAuth

2018-01-08 Thread Frediano Ziglio
Instead of having half state in RedSASL and half in RedSASLAuth move everything in RedSASLAuth. This also reduces memory usage when we are using SASL but we finish the authentication step. Signed-off-by: Frediano Ziglio --- server/red-stream.c | 129

Re: [Spice-devel] [PATCH spice-gtk 1/2] gstreamer: use custom playbin sink

2018-01-08 Thread Frediano Ziglio
> > Use custom playbin sink instead of just appsink. > In order to allow playbin to choose decoders that requires > more complex pipelines (e.g. pipeline that requires color > space conversion & uses gl memory). > The new sink composed as such: > ... ! autovideoconvert ! gldownload ! appsink

Re: [Spice-devel] [PATCH spice-gtk 1/2] gstreamer: use custom playbin sink

2018-01-08 Thread Snir Sheriber
Hi, On 01/04/2018 11:26 AM, Christophe Fergeau wrote: On Sun, Dec 31, 2017 at 05:46:24PM +0200, Snir Sheriber wrote: Use custom playbin sink instead of just appsink. In order to allow playbin to choose decoders that requires more complex pipelines (e.g. pipeline that requires color space

[Spice-devel] How to configure spice proxy with virt-viewer

2018-01-08 Thread 王杰东
When my virt-viewer spice clients are in net-A , and the hypervisor server with spice is in net-B , and a server is in both net-A and net-B How can i use virt-viewer to connect th vms on hypervisor server ?

Re: [Spice-devel] [spice-gtk 0/2] FreeBSD build fixes

2018-01-08 Thread Frediano Ziglio
> > Hey, > > Here are 2 build fixes for FreeBSD which were filed in bugzilla ([1] and > [2]). They look good to me, so I'll push them in a few days if nobody > objects in the mean time. > > Christophe > > [1] https://bugs.freedesktop.org/show_bug.cgi?id=104524 > [2]

Re: [Spice-devel] [PATCH spice-gtk 1/2] gstreamer: use custom playbin sink

2018-01-08 Thread Christophe Fergeau
On Mon, Jan 08, 2018 at 04:47:26AM -0500, Frediano Ziglio wrote: > > > > Use custom playbin sink instead of just appsink. > > In order to allow playbin to choose decoders that requires > > more complex pipelines (e.g. pipeline that requires color > > space conversion & uses gl memory). > > The

Re: [Spice-devel] How to configure spice proxy with virt-viewer

2018-01-08 Thread Christophe Fergeau
On Mon, Jan 08, 2018 at 04:05:30PM +0800, 王杰东 wrote: > When my virt-viewer spice clients are in net-A , and the hypervisor server > with spice is in net-B , and a server is in both net-A and net-B > How can i use virt-viewer to connect th vms on hypervisor server ? > >

[Spice-devel] [spice-gtk 1/2] build-sys: Enable ACL support on FreeBSD

2018-01-08 Thread Christophe Fergeau
From: Ting-Wei Lan sys/acl.h works on both FreeBSD and Linux, so we should use it instead of acl/libacl.h, which only works on Linux. FreeBSD puts ACL functions in libc, so we should check whether ACL functions are available in libc before doing the check with -lacl.

[Spice-devel] [spice-gtk 2/2] build-sys: Workaround missing openssl.pc for FreeBSD

2018-01-08 Thread Christophe Fergeau
From: Ting-Wei Lan FreeBSD has OpenSSL installed in base, but .pc files are not available. We can still successfully build spice-gtk by setting SSL_CFLAGS and SSL_LIBS variables manually, but openssl will still be recorded to Requires.private field of

[Spice-devel] [spice-gtk 0/2] FreeBSD build fixes

2018-01-08 Thread Christophe Fergeau
Hey, Here are 2 build fixes for FreeBSD which were filed in bugzilla ([1] and [2]). They look good to me, so I'll push them in a few days if nobody objects in the mean time. Christophe [1] https://bugs.freedesktop.org/show_bug.cgi?id=104524 [2]

Re: [Spice-devel] [PATCH spice-gtk 1/2] gstreamer: use custom playbin sink

2018-01-08 Thread Snir Sheriber
Hi On 01/08/2018 11:47 AM, Frediano Ziglio wrote: Use custom playbin sink instead of just appsink. In order to allow playbin to choose decoders that requires more complex pipelines (e.g. pipeline that requires color space conversion & uses gl memory). The new sink composed as such: ... !

Re: [Spice-devel] How to configure spice proxy with virt-viewer

2018-01-08 Thread Snir Sheriber
Hi, On 01/08/2018 03:17 PM, Christophe Fergeau wrote: On Mon, Jan 08, 2018 at 04:05:30PM +0800, 王杰东 wrote: When my virt-viewer spice clients are in net-A , and the hypervisor server with spice is in net-B , and a server is in both net-A and net-B How can i use virt-viewer to connect th vms