Summary: | event loop test fails from time to time | ||
---|---|---|---|
Product: | Wayland | Reporter: | Marek Chalupa <mchqwerty> |
Component: | wayland | Assignee: | Wayland bug list <wayland-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Add asserts, fix indentation
Sleep 15ms before entering epoll_wait Add asserts, fix indentation |
Description
Marek Chalupa
2014-06-27 12:29:26 UTC
Hi, looked a little bit into it. This occasional failure is caused by epoll_wait catching only one timer source. Since we have not guaranteed that both timers will expire exactly at the same time, it may happen that epoll_wait will return before the later timer expires, having only one fd ready. The best fix IMO (tried) would be to add getter for source's fd and poll on the fd until it's ready for reading. This way we could wait for both timers to expire before calling wl_event_loop_dispatch. This would require change in libwayland, though. The solution I therefore chose is just simply sleep a while before entering the epoll_wait, so that we are "sure" that both timers expired. Along with the patch solving this, I'm attaching patch that adds some asserts into this test and fixes wrong indentation. Cheers, Marek Created attachment 104879 [details] [review] Add asserts, fix indentation Created attachment 104880 [details] [review] Sleep 15ms before entering epoll_wait Created attachment 104881 [details] [review] Add asserts, fix indentation Oops, seems like loading the patch failed. This is the same patch loaded again. Both patches pushed. commit b24fa4c8216e3f0f7b644c7b8c6949925f19ada9 Author: Marek Chalupa <mchqwerty@gmail.com> Date: Tue Aug 19 12:03:48 2014 +0200 tests: fix event_loop_timer_updates commit 12ec657014d7fda1c9ebb0358a72bd1a4b5d868c Author: Marek Chalupa <mchqwerty@gmail.com> Date: Tue Aug 19 10:34:52 2014 +0200 tests: event_loop_timer_updates - add asserts and fix indentation I assume this fixes the issue. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.