summaryrefslogtreecommitdiff
path: root/server/tests/test-loop.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-12tests: add a new case for event loop timersFrediano Ziglio1-10/+30
Check that cancelling a timer the timer callback is not called. This can happen in latency code (red-channel.c). In red_channel_client_cancel_ping_timer latency timer is cancelled and state is set to PING_STATE_NONE however if timer was already active what happens is that the red_channel_client_ping_timer is called and the line spice_assert(rcc->latency_monitor.state == PING_STATE_TIMER); is triggered causing spice-server to abort. This happens as GLib loop add all active sources to an array but if the timer is deactivated before the event is dispatched the event will be dispatched unless the source is destroyed. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-01-19tests: test removed triggered timers are not calledFrediano Ziglio1-0/+21
This could happen for instance if a given timer remove all clients which have associated timers. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-01-19tests: add a test for event loopFrediano Ziglio1-0/+134
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>