[Spice-devel] [PATCH spice-server] test-stream-device: Expect the g_log warning about invalid message
Christophe Fergeau
cfergeau at redhat.com
Thu Aug 9 10:16:25 UTC 2018
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
On Thu, Aug 09, 2018 at 11:25:09AM +0200, Lukáš Hrázký wrote:
> 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>
> ---
> server/tests/test-stream-device.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> 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
> --
> 2.18.0
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180809/7f5d2ae4/attachment.sig>
More information about the Spice-devel
mailing list