[Spice-devel] [PATCH v8 19/20] test-cd-emu: Make sure we can call spice_usb_backend_channel_flush_writes
Victor Toso
victortoso at redhat.com
Fri Sep 27 10:04:02 UTC 2019
Hi,
Sorry if I wasn't clear before but I'm completely fine with the
tests patches as well. I take that only one patch (the command
line option one) isn't going to be merged as some work on the
design is pending, correct?
Cheers,
On Thu, Sep 19, 2019 at 04:11:32PM +0200, Victor Toso wrote:
> From: Frediano Ziglio <fziglio at redhat.com>
>
> Currently we call this function when the SPICE channel is up
> however this function should continue to work as in theory
> the channel could avoid to handle the message and stop the flow
> (for instance to implement some kind of flow limitation)
> and so will need to call this function again.
> This was failing in the first USB emulation implementation
> causing a crash.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> tests/cd-emu.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/cd-emu.c b/tests/cd-emu.c
> index fb023a9..690423b 100644
> --- a/tests/cd-emu.c
> +++ b/tests/cd-emu.c
> @@ -164,6 +164,10 @@ device_iteration(const int loop, const bool attach_on_connect)
> g_assert_cmpint(hellos_sent, ==, hellos_expected);
> g_assert_cmpint(messages_sent, >=, messages_expected);
>
> + spice_usb_backend_channel_flush_writes(usb_ch);
> + g_assert_cmpint(hellos_sent, ==, hellos_expected);
> + g_assert_cmpint(messages_sent, >=, messages_expected);
> +
> // send hello reply
> if (loop == 0) {
> DATA_START
> --
> 2.21.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/20190927/d4bf4ea4/attachment.sig>
More information about the Spice-devel
mailing list