diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2019-09-19 16:11:32 +0200 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2019-09-27 11:08:45 +0100 |
commit | 7d5e1c30058c7137b5cac5b654e176e6faeb69af (patch) | |
tree | 79c447b0df0cb517a1e931e9f0778cb97f0a1763 /tests | |
parent | 52074d7590979c4741609b1887258a2057776cf4 (diff) |
test-cd-emu: Make sure we can call spice_usb_backend_channel_flush_writes
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@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cd-emu.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 |