Re: [Spice-devel] [PATCH v2 2/2] autotools: compile gst-test only if gstreamer is available

2017-02-02 Thread Brad Campbell
On 18/01/17 21:29, Snir Sheriber wrote: Needed in order to avoid compilation error when gstreamer is unavailable --- server/tests/Makefile.am | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) Is this patch headed for the tree any time soon? Without it, compilation on systems withou

[Spice-devel] [PATCH spice-common] Document REGION_TEST_* bitmasks

2017-02-02 Thread Jonathon Jongsma
--- I'm not sure whether these values are self-explanatory to everyone else, but I found these comments somewhat helpful when studying the Drawable tree code recently. common/region.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/region.h b/common/region.h index 4619406..9f92b32 1

Re: [Spice-devel] [PATCH spice-server 2/2] stat-file: Avoid compiler warning

2017-02-02 Thread Jonathon Jongsma
On Thu, 2017-02-02 at 12:46 +, Frediano Ziglio wrote: > Some gcc version reports this error: > > stat-file.c: In function 'stat_file_add_node': > stat-file.c:180:15: error: 'node' may be used uninitialized in this > function > [-Werror=maybe-uninitialized] >  g_strlcpy(node->name, name, si

Re: [Spice-devel] [PATCH spice-server 1/2] stat-file: Fix off by one buffer overflow

2017-02-02 Thread Jonathon Jongsma
On Thu, 2017-02-02 at 10:52 -0600, Jonathon Jongsma wrote: > Acked-by: Jonathon Jongsma > > Out of curiosity, how did you find it? Just reading code? Nevermind. I see that the next patch is addressing a compiler warning in this code, so you were obviously looking closely at this code for that re

Re: [Spice-devel] [PATCH spice-server 1/2] stat-file: Fix off by one buffer overflow

2017-02-02 Thread Jonathon Jongsma
Acked-by: Jonathon Jongsma Out of curiosity, how did you find it? Just reading code? On Thu, 2017-02-02 at 12:46 +, Frediano Ziglio wrote: > The stat file contains an array of max_nodes elements > so we must stay in [0, max_nodes) range, not [0, max_nodes]. > > There are no spice path tha

Re: [Spice-devel] [spice-server v2 7/7] test-vdagent: Make test case more useful

2017-02-02 Thread Christophe Fergeau
On Thu, Feb 02, 2017 at 04:22:20PM +0100, Christophe Fergeau wrote: > This switches the test to using the GTest API, and add several tests > related to https://bugzilla.redhat.com/show_bug.cgi?id=1411194 > > The "multiple-vmc-devices" is based off code written by Frediano Ziglio. > --- > server/t

Re: [Spice-devel] [spice-server v3 10/10] sound: Convert SndChannelClient to RedChannelClient

2017-02-02 Thread Frediano Ziglio
> > I've pushed the whole series now. > > Christophe > Great! Thank Frediano ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH] Don't close all but one display during reboot.

2017-02-02 Thread Jonathon Jongsma
On Thu, 2017-02-02 at 05:29 -0500, Frediano Ziglio wrote: > > > > When a guest is rebooted, the QXL driver gets unloaded at some > > point in > > the reboot process. When the driver is unloaded, the spice server > > sets a > > single flag to FALSE: RedWorker::driver_cap_monitors_config. This > > f

[Spice-devel] [PATCH spice-server 2/2] sound: Use memcpy instead of manually copy volume array

2017-02-02 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/sound.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/sound.c b/server/sound.c index 7c36174..b692646 100644 --- a/server/sound.c +++ b/server/sound.c @@ -384,7 +384,6 @@ static int snd_playback_send_migrate(PlaybackChan

[Spice-devel] [PATCH spice-server 0/2] Minor sound follow ups

2017-02-02 Thread Frediano Ziglio
I think I already sent these in a bigger patch series. Frediano Ziglio (2): sound: Use default message handler if possible sound: Use memcpy instead of manually copy volume array server/sound.c | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) -- 2.9.3

[Spice-devel] [PATCH spice-server 1/2] sound: Use default message handler if possible

2017-02-02 Thread Frediano Ziglio
red_channel_client_handle_message can handle base messages so reuse it. Signed-off-by: Frediano Ziglio --- server/sound.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/server/sound.c b/server/sound.c index 4548c25..7c36174 100644 --- a/server/sound.c +++ b/

Re: [Spice-devel] [spice-server v2 6/7] Use spice_debug rather than spice_info in library code

2017-02-02 Thread Frediano Ziglio
> > Using spice_info() gets in the way of tests using > g_test_expect_message() as all the messages emitted using > a non-debug log level must be listed as expected, otherwise we get a > critical about an expected message not having been logged. Some are meant to go on the logs as informations an

[Spice-devel] [spice-server v2 1/7] test-vdagent: Pass proper types to spice_server_add_interface

2017-02-02 Thread Christophe Fergeau
This is a revert of 93b4f4050^ and 93b4f4050. For a SpiceCharDeviceInstance, the base interface must be a SpiceCharDeviceInterface instance, not a SpiceBaseInterface instance, or spice-server code will end up reading out of bounds. vmc_state/vmc_write/vmc_read implementations also have to be provi

Re: [Spice-devel] [spice-server v3 10/10] sound: Convert SndChannelClient to RedChannelClient

2017-02-02 Thread Christophe Fergeau
I've pushed the whole series now. Christophe On Mon, Jan 30, 2017 at 01:37:00PM +0100, Christophe Fergeau wrote: > On Mon, Jan 30, 2017 at 07:02:04AM -0500, Frediano Ziglio wrote: > > > > > > > > Fwiw, see the merged patch attached to this mail. Frediano feels > > > strongly that these should b

[Spice-devel] [spice-server v2 7/7] test-vdagent: Make test case more useful

2017-02-02 Thread Christophe Fergeau
This switches the test to using the GTest API, and add several tests related to https://bugzilla.redhat.com/show_bug.cgi?id=1411194 The "multiple-vmc-devices" is based off code written by Frediano Ziglio. --- server/tests/Makefile.am| 1 + server/tests/test-vdagent.c | 87 +++

[Spice-devel] [spice-server v2 4/7] test: Add test_destroy()

2017-02-02 Thread Christophe Fergeau
This allows to chain several test cases by using test_new()/test_destroy(). --- server/tests/test-display-base.c | 7 +++ server/tests/test-display-base.h | 1 + 2 files changed, 8 insertions(+) diff --git a/server/tests/test-display-base.c b/server/tests/test-display-base.c index 55e37a5..63

[Spice-devel] [spice-server v2 6/7] Use spice_debug rather than spice_info in library code

2017-02-02 Thread Christophe Fergeau
Using spice_info() gets in the way of tests using g_test_expect_message() as all the messages emitted using a non-debug log level must be listed as expected, otherwise we get a critical about an expected message not having been logged. --- server/cursor-channel.c | 4 +-- server/dcc.c

[Spice-devel] [spice-server v2 3/7] test-playback: Pass proper types to spice_server_add_interface

2017-02-02 Thread Christophe Fergeau
This is a revert of b76e561d. For a SpicePlaybackInstance, the base interface must be a SpicePlaybackInterface instance, not a SpiceBaseInterface instance, or spice-server code will end up reading out of bounds. --- server/tests/test-playback.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[Spice-devel] [spice-server v2 5/7] reds: Close sockets when using spice_server_destroy()

2017-02-02 Thread Christophe Fergeau
Currently, the network sockets opened by reds_init_net() are not closed on destruction, in other words they are leaked. --- server/reds.c | 13 + 1 file changed, 13 insertions(+) diff --git a/server/reds.c b/server/reds.c index 8ef4efe..04f0856 100644 --- a/server/reds.c +++ b/server/

[Spice-devel] [spice-server v2 2/7] test-display-base: Pass proper types to spice_server_add_interface

2017-02-02 Thread Christophe Fergeau
This is a revert of 93b4f4050^ and 93b4f4050. For a SpiceCharDeviceInstance, the base interface must be a SpiceCharDeviceInterface instance, not a SpiceBaseInterface instance, or spice-server code will end up reading out of bounds. vmc_state/vmc_write/vmc_read implementations also have to be provi

[Spice-devel] [spice-server v2 0/7] Misc improvements to test cases

2017-02-02 Thread Christophe Fergeau
This series fixes some issues with test cases crashing when being run. This also improves the 'test-vdagent' one which wasn't doing much useful work. Christophe ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org

Re: [Spice-devel] [PATCH spice-server] stat-file: Avoid compiler warning

2017-02-02 Thread Frediano Ziglio
> > On 02/02/2017 02:36 PM, Frediano Ziglio wrote: > >> > >> On 02/02/2017 11:52 AM, Frediano Ziglio wrote: > >>> Some gcc version reports this error: > >>> > >>> stat-file.c: In function 'stat_file_add_node': > >>> stat-file.c:180:15: error: 'node' may be used uninitialized in this > >>> function

Re: [Spice-devel] [PATCH spice-server] stat-file: Avoid compiler warning

2017-02-02 Thread Uri Lublin
On 02/02/2017 02:36 PM, Frediano Ziglio wrote: On 02/02/2017 11:52 AM, Frediano Ziglio wrote: Some gcc version reports this error: stat-file.c: In function 'stat_file_add_node': stat-file.c:180:15: error: 'node' may be used uninitialized in this function [-Werror=maybe-uninitialized] g_st

Re: [Spice-devel] [spice-server 1/3] test_vdagent: Pass proper types to spice_server_add_interface

2017-02-02 Thread Frediano Ziglio
> > On Tue, Jan 31, 2017 at 12:15:13PM -0500, Frediano Ziglio wrote: > > > > > > On Tue, Jan 31, 2017 at 07:45:44AM -0500, Frediano Ziglio wrote: > > > > Title should be test-vdagent (with dash). > > > > > > Thanks, fixed. > > > > > > > > > > > > > > > > > This is a revert of 93b4f4050^ and 9

[Spice-devel] [PATCH spice-server 2/2] stat-file: Avoid compiler warning

2017-02-02 Thread Frediano Ziglio
Some gcc version reports this error: stat-file.c: In function 'stat_file_add_node': stat-file.c:180:15: error: 'node' may be used uninitialized in this function [-Werror=maybe-uninitialized] g_strlcpy(node->name, name, sizeof(node->name)); ^~~~ cc1: all warnings being treated a

[Spice-devel] [PATCH spice-server 1/2] stat-file: Fix off by one buffer overflow

2017-02-02 Thread Frediano Ziglio
The stat file contains an array of max_nodes elements so we must stay in [0, max_nodes) range, not [0, max_nodes]. There are no spice path that lead to these overflows but it's better to have them fixed before creating one. Signed-off-by: Frediano Ziglio --- server/stat-file.c | 4 ++-- 1 file

Re: [Spice-devel] [PATCH spice-server] stat-file: Avoid compiler warning

2017-02-02 Thread Frediano Ziglio
> > On 02/02/2017 11:52 AM, Frediano Ziglio wrote: > > Some gcc version reports this error: > > > > stat-file.c: In function 'stat_file_add_node': > > stat-file.c:180:15: error: 'node' may be used uninitialized in this > > function > > [-Werror=maybe-uninitialized] > > g_strlcpy(node->name, n

Re: [Spice-devel] [PATCH spice-server] stat-file: Avoid compiler warning

2017-02-02 Thread Uri Lublin
On 02/02/2017 11:52 AM, Frediano Ziglio wrote: Some gcc version reports this error: stat-file.c: In function 'stat_file_add_node': stat-file.c:180:15: error: 'node' may be used uninitialized in this function [-Werror=maybe-uninitialized] g_strlcpy(node->name, name, sizeof(node->name));

Re: [Spice-devel] [PATCH spice-server v2] gstreamer: Include only needed fields in SpiceFormatForGStreamer structure

2017-02-02 Thread Victor Toso
Hi, On Fri, Jan 27, 2017 at 10:29:22AM +, Frediano Ziglio wrote: > This structure is used to store format information for > both Gstreamer 0.10 and 1.0 however the two format uses > different fields from it. > Use a macro to filter only needed fields. > This currently also fixes a compile erro

Re: [Spice-devel] [PATCH spice-server v2] gstreamer: Include only needed fields in SpiceFormatForGStreamer structure

2017-02-02 Thread Victor Toso
On Thu, Feb 02, 2017 at 10:17:09AM +0100, Christophe Fergeau wrote: > On Wed, Feb 01, 2017 at 03:09:36PM +0100, Victor Toso wrote: > > Hi, > > > > On Wed, Feb 01, 2017 at 05:48:32AM -0500, Frediano Ziglio wrote: > > > > > > > > Hi, > > > > > > > > On Fri, Jan 27, 2017 at 10:29:22AM +, Frediano

Re: [Spice-devel] [PATCH] Don't close all but one display during reboot.

2017-02-02 Thread Frediano Ziglio
> > When a guest is rebooted, the QXL driver gets unloaded at some point in > the reboot process. When the driver is unloaded, the spice server sets a > single flag to FALSE: RedWorker::driver_cap_monitors_config. This flag > indicates whether the driver is capable of sending its own monitors conf

Re: [Spice-devel] [PATCH spice-server v2] gstreamer: Include only needed fields in SpiceFormatForGStreamer structure

2017-02-02 Thread Frediano Ziglio
> > On Wed, Feb 01, 2017 at 03:09:36PM +0100, Victor Toso wrote: > > Hi, > > > > On Wed, Feb 01, 2017 at 05:48:32AM -0500, Frediano Ziglio wrote: > > > > > > > > Hi, > > > > > > > > On Fri, Jan 27, 2017 at 10:29:22AM +, Frediano Ziglio wrote: > > > > > This structure is used to store format i

[Spice-devel] [PATCH spice-server] stat-file: Avoid compiler warning

2017-02-02 Thread Frediano Ziglio
Some gcc version reports this error: stat-file.c: In function 'stat_file_add_node': stat-file.c:180:15: error: 'node' may be used uninitialized in this function [-Werror=maybe-uninitialized] g_strlcpy(node->name, name, sizeof(node->name)); ^~~~ cc1: all warnings being treated a

Re: [Spice-devel] [spice-server 1/3] test_vdagent: Pass proper types to spice_server_add_interface

2017-02-02 Thread Christophe Fergeau
On Tue, Jan 31, 2017 at 12:15:13PM -0500, Frediano Ziglio wrote: > > > > On Tue, Jan 31, 2017 at 07:45:44AM -0500, Frediano Ziglio wrote: > > > Title should be test-vdagent (with dash). > > > > Thanks, fixed. > > > > > > > > > > > > > This is a revert of 93b4f4050^ and 93b4f4050. > > > > For a

Re: [Spice-devel] [spice-server v6 7/9] reds: drop sscanf() in favour of g_strsplit()

2017-02-02 Thread Frediano Ziglio
> > On Wed, Feb 01, 2017 at 01:39:26PM +0100, Victor Toso wrote: > > Hi, > > > > On Tue, Jan 31, 2017 at 03:54:01PM +0100, Christophe Fergeau wrote: > > > On Tue, Jan 31, 2017 at 07:16:04AM -0500, Frediano Ziglio wrote: > > > > > > > > > > From: Victor Toso > > > > > > > > > > As there is a need

Re: [Spice-devel] [PATCH spice-server] tests: Test bug registering 2 vdagent devices

2017-02-02 Thread Christophe Fergeau
On Tue, Jan 31, 2017 at 12:25:00PM -0500, Frediano Ziglio wrote: > > > > On Tue, Jan 31, 2017 at 05:04:46PM +, Frediano Ziglio wrote: > > > This reproduces https://bugzilla.redhat.com/show_bug.cgi?id=1411194 > > > > Maybe it does reproduce it, maybe not... > > > > If you want a similar backt

Re: [Spice-devel] [spice-server v6 7/9] reds: drop sscanf() in favour of g_strsplit()

2017-02-02 Thread Christophe Fergeau
On Wed, Feb 01, 2017 at 01:39:26PM +0100, Victor Toso wrote: > Hi, > > On Tue, Jan 31, 2017 at 03:54:01PM +0100, Christophe Fergeau wrote: > > On Tue, Jan 31, 2017 at 07:16:04AM -0500, Frediano Ziglio wrote: > > > > > > > > From: Victor Toso > > > > > > > > As there is a need to iterate over ever

Re: [Spice-devel] [PATCH spice-server v2] gstreamer: Include only needed fields in SpiceFormatForGStreamer structure

2017-02-02 Thread Christophe Fergeau
On Wed, Feb 01, 2017 at 03:09:36PM +0100, Victor Toso wrote: > Hi, > > On Wed, Feb 01, 2017 at 05:48:32AM -0500, Frediano Ziglio wrote: > > > > > > Hi, > > > > > > On Fri, Jan 27, 2017 at 10:29:22AM +, Frediano Ziglio wrote: > > > > This structure is used to store format information for > > >