Mir

Merge lp://qastaging/~alan-griffiths/mir/frig-1283085 into lp://qastaging/mir

Proposed by Alan Griffiths
Status: Merged
Approved by: Alan Griffiths
Approved revision: no longer in the source branch.
Merged at revision: 1422
Proposed branch: lp://qastaging/~alan-griffiths/mir/frig-1283085
Merge into: lp://qastaging/mir
Diff against target: 42 lines (+8/-8)
1 file modified
tests/unit-tests/graphics/mesa/test_display.cpp (+8/-8)
To merge this branch: bzr merge lp://qastaging/~alan-griffiths/mir/frig-1283085
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alexandros Frantzis (community) Approve
Daniel van Vugt Approve
Review via email: mp+207682@code.qastaging.launchpad.net

Commit message

tests: Address some raciness in MesaDisplayTest.drm_device_change_event_triggers_handler

Description of the change

tests: Address some raciness in MesaDisplayTest.drm_device_change_event_triggers_handler

Fixes one race (touching the GTEST infrastructure from a thread) and hides some raciness in fake_devices and/or umockdev

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

(1) This sounds like a hack, should we be concerned?
   25 + // sleeping between calls to fake_devices hides race conditions
The sleep call already exists, so it's functionally no worse. Only the new comment could concern the reader.

(2) It's probably better practice to keep "<" instead of "!=" in loops like this:
   for (int i = 0; i != device_change_count; ++i)
Because that protects you from potential changes to i's initial conditions or increment.

Although if this fixes the bug then neither of those issues are worth blocking on.

review: Approve
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

OK for now. Hopefully, we can find and fix the root of the races at some point, especially since we have started to depend more on umockdev.

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> (1) This sounds like a hack, should we be concerned?
> 25 + // sleeping between calls to fake_devices hides race
> conditions
> The sleep call already exists, so it's functionally no worse. Only the new
> comment could concern the reader.

And so it should. ;)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

"Cannot add PPA: 'ppa:chris.gagnon/mir-demo-tester'."

[Possibly intermittent] CI issue

reapproving

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches