[Bug 37381] client-types.py appears to have a race

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 8 18:56:22 CET 2012


https://bugs.freedesktop.org/show_bug.cgi?id=37381

--- Comment #2 from Will Thompson <will.thompson at collabora.co.uk> 2012-02-08 09:56:22 PST ---
(In reply to comment #1)
> The first race is fixed by your sync_stream.
> 
> The second race is interesting :) It can be reproduced at 100% if you add a
> time.sleep(2) just before the "phone comes online". The race happens when the
> 'phone' and the 'pc' come online at different time in second since Epoch.
> 
> It is due to src/presence.c aggregate_resources(): the sort criteria to find
> the best resource has 2 problems:
> 
> - it depends on last_available in seconds, and the unit tests cannot guarantee
> that both resources will come online at the same Epoch-second.

This could perhaps be addressed by doing something like tests/test-presence.c?
It explicitly controls the time at which events appear to occur.

> - it sorts both on last_available and on client_type but none of them has a
> priority over the other, so the result of the sorting will depend on the
> previous order. We need to decide whether last_available or client_type is more
> important.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list