diff options
| author | Joshua Watt <JPEWhacker@gmail.com> | 2025-11-10 14:57:06 -0700 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2025-12-12 11:48:19 +0000 |
| commit | 99638501a1314e68c79176fa2cafa3bbe6cf55ea (patch) | |
| tree | 1aa9fd937bf0429042fb08015f807fe49f01cea3 | |
| parent | doc: Refactor the build system for complete build dir docs (diff) | |
| download | wayland-99638501a1314e68c79176fa2cafa3bbe6cf55ea.tar wayland-99638501a1314e68c79176fa2cafa3bbe6cf55ea.tar.gz wayland-99638501a1314e68c79176fa2cafa3bbe6cf55ea.tar.bz2 wayland-99638501a1314e68c79176fa2cafa3bbe6cf55ea.tar.lz wayland-99638501a1314e68c79176fa2cafa3bbe6cf55ea.tar.xz wayland-99638501a1314e68c79176fa2cafa3bbe6cf55ea.tar.zst wayland-99638501a1314e68c79176fa2cafa3bbe6cf55ea.zip | |
tests/event-loop-test: Remove event loop timer test
The event loop timer test has very precise sequencing and timing
constraints, which make it difficult to pass reliably on loaded systems.
Since this test isn't providing much value, remove it to prevent the
erroneous errors.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
| -rw-r--r-- | tests/event-loop-test.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/event-loop-test.c b/tests/event-loop-test.c index a51ba8f..be15a34 100644 --- a/tests/event-loop-test.c +++ b/tests/event-loop-test.c @@ -238,49 +238,6 @@ TEST(event_loop_multiple_same_signals) wl_event_loop_destroy(loop); } -static int -timer_callback(void *data) -{ - int *got_it = data; - - ++(*got_it); - - return 1; -} - -TEST(event_loop_timer) -{ - struct wl_event_loop *loop = wl_event_loop_create(); - struct wl_event_source *source1, *source2; - int got_it = 0; - - source1 = wl_event_loop_add_timer(loop, timer_callback, &got_it); - assert(source1); - wl_event_source_timer_update(source1, 20); - - source2 = wl_event_loop_add_timer(loop, timer_callback, &got_it); - assert(source2); - wl_event_source_timer_update(source2, 100); - - /* Check that the timer marked for 20 msec from now fires within 30 - * msec, and that the timer marked for 100 msec is expected to fire - * within an additional 90 msec. (Some extra wait time is provided to - * account for reasonable code execution / thread preemption delays.) */ - - wl_event_loop_dispatch(loop, 0); - assert(got_it == 0); - wl_event_loop_dispatch(loop, 30); - assert(got_it == 1); - wl_event_loop_dispatch(loop, 0); - assert(got_it == 1); - wl_event_loop_dispatch(loop, 90); - assert(got_it == 2); - - wl_event_source_remove(source1); - wl_event_source_remove(source2); - wl_event_loop_destroy(loop); -} - #define MSEC_TO_USEC(msec) ((msec) * 1000) struct timer_update_context { |
