[Spice-commits] 2 commits - server/dcc.c server/tests

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 9 10:43:16 UTC 2018


 server/dcc.c                      |    2 +-
 server/tests/test-stream-device.c |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 5c98338479933ae5b319e25e577f192eaf37223d
Author: Lukáš Hrázký <lhrazky at redhat.com>
Date:   Thu Aug 9 11:25:09 2018 +0200

    test-stream-device: Expect the g_log warning about invalid message
    
    Fixes test-stream-device after adding a log warning about an invalid
    message received on the stream device, glib tests fail on unexpected
    warning messages.
    
    Signed-off-by: Lukáš Hrázký <lhrazky at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/tests/test-stream-device.c b/server/tests/test-stream-device.c
index c1872d53..f1707d2f 100644
--- a/server/tests/test-stream-device.c
+++ b/server/tests/test-stream-device.c
@@ -327,6 +327,8 @@ static void test_stream_device(TestFixture *fixture, gconstpointer user_data)
         spice_server_char_device_wakeup(&vmc_instance);
         g_assert_cmpint(pos, ==, 0);
 
+        g_test_expect_message(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Stream device received invalid message: Invalid message type");
+
         // we need to open the device and kick the start
         spice_server_port_event(&vmc_instance, SPICE_PORT_EVENT_OPENED);
         spice_server_char_device_wakeup(&vmc_instance);
@@ -395,6 +397,8 @@ static void test_stream_device_format_after_data(TestFixture *fixture, gconstpoi
     *message_sizes_end = p - message;
     ++message_sizes_end;
 
+    g_test_expect_message(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Stream device received invalid message: Invalid message type");
+
     test_kick();
 
     // we should read all data
@@ -442,6 +446,8 @@ static void test_stream_device_huge_data(TestFixture *fixture, gconstpointer use
     *message_sizes_end = p - message;
     ++message_sizes_end;
 
+    g_test_expect_message(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "Stream device received invalid message: STREAM_DATA too large");
+
     test_kick();
 
     // we should read all data
commit 81480cc3cc5b7b8876e659bda780dd9aeaf4f6fc
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Thu Aug 9 11:23:22 2018 +0200

    build: Fix build from tarballs
    
    Following commit fcaf8d1a1, build from tarballs/make distcheck is broken
    as spice-server-enums.h is not regenerated when building from tarballs,
    and we don't have a -I$(top_srcdir) in our build flags, just
    -I$(srcdir). This commit changes #include <server/spice-server-enums.h>
    to #include <spice-server-enums.h> which avoids the problem fixed by
    commit fcaf8d1a1 without breaking make distcheck.
    
    Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/dcc.c b/server/dcc.c
index 9498e7de..826dd28f 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -24,7 +24,7 @@
 #include "display-channel-private.h"
 #include "red-client.h"
 #include "main-channel-client.h"
-#include <server/spice-server-enums.h>
+#include <spice-server-enums.h>
 #include "glib-compat.h"
 
 G_DEFINE_TYPE(DisplayChannelClient, display_channel_client, TYPE_COMMON_GRAPHICS_CHANNEL_CLIENT)


More information about the Spice-commits mailing list