Mir

Merge lp://qastaging/~alan-griffiths/mir/fix-1388802-possibly 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: 2040
Proposed branch: lp://qastaging/~alan-griffiths/mir/fix-1388802-possibly
Merge into: lp://qastaging/mir
Diff against target: 132 lines (+33/-3)
1 file modified
tests/acceptance-tests/test_client_input.cpp (+33/-3)
To merge this branch: bzr merge lp://qastaging/~alan-griffiths/mir/fix-1388802-possibly
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Chris Halse Rogers Approve
Alberto Aguirre (community) Approve
Review via email: mp+240926@code.qastaging.launchpad.net

Commit message

tests: Make TestClientInput less helgrind unfriendly

Description of the change

tests: Make TestClientInput less helgrind unfriendly

helgrind reports a number of errors around expectations - but many of these seem to be because the thread fulfilling the expectation is running before the expectation is set. There is sequencing (by only sending events from the server after setting expectations) but streaming data over a socket goes beyond the "memory model" and helgrind doesn't see it.

I've changed the tests to start the client thread after the expectations are set - which more than halves the size of the helgrind report.

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
Alberto Aguirre (albaguirre) wrote :

Sure.

review: Approve
Revision history for this message
Chris Halse Rogers (raof) wrote :

I'm not super-enthused about the general principle of making code (slightly) less obviously correct in order to appease an external correctness-checking tool.

In this case it seems a worthwhile tradeoff.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Suspicious that acceptance tests for this are crashing in CI. That suggests more needs fixing...

pull: /var/crash/_usr_bin_mir_acceptance_tests.32011.uploaded -> ./results/crash/_usr_bin_mir_acceptance_tests.32011.uploaded
failed to copy '/var/crash/_usr_bin_mir_acceptance_tests.32011.uploaded' to './results/crash/_usr_bin_mir_acceptance_tests.32011.uploaded': Permission denied
pull: /var/crash/_usr_bin_mir_acceptance_tests.32011.upload -> ./results/crash/_usr_bin_mir_acceptance_tests.32011.upload
pull: /var/crash/_usr_sbin_unity-system-compositor.0.uploaded -> ./results/crash/_usr_sbin_unity-system-compositor.0.uploaded
failed to copy '/var/crash/_usr_sbin_unity-system-compositor.0.uploaded' to './results/crash/_usr_sbin_unity-system-compositor.0.uploaded': Permission denied
pull: /var/crash/_usr_sbin_unity-system-compositor.0.upload -> ./results/crash/_usr_sbin_unity-system-compositor.0.upload
pull: /var/crash/_usr_bin_mir_acceptance_tests.32011.crash -> ./results/crash/_usr_bin_mir_acceptance_tests.32011.crash
pull: /var/crash/_usr_sbin_unity-system-compositor.0.crash -> ./results/crash/_usr_sbin_unity-system-compositor.0.crash
failed to copy '/var/crash/_usr_sbin_unity-system-compositor.0.crash' to './results/crash/_usr_sbin_unity-system-compositor.0.crash': Permission denied
pull: /var/crash/.lock -> ./results/crash/.lock
7 files pulled. 0 files skipped.

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

The failing test is unrelated to this MP:

[----------] 1 test from StaleFrames
[ RUN ] StaleFrames.are_dropped_when_restarting_compositor
/tmp/buildd/mir-0.8.0+14.10.20141010bzr2039pkg0vivid4+autopilot0/tests/integration-tests/test_stale_frames.cpp:203: Failure
Expected: (stale_buffer_id1) != (stale_buffer_id2), actual: 3 vs 3
/tmp/buildd/mir-0.8.0+14.10.20141010bzr2039pkg0vivid4+autopilot0/tests/integration-tests/test_stale_frames.cpp:204: Failure
Expected: (stale_buffer_id2) != (buffer_id3), actual: 3 vs 3
/tmp/buildd/mir-0.8.0+14.10.20141010bzr2039pkg0vivid4+autopilot0/tests/integration-tests/test_stale_frames.cpp:209: Failure
Value of: new_buffers[0]
Actual: 40
Expected: buffer_id3
Which is: 3
[ FAILED ] StaleFrames.are_dropped_when_restarting_compositor (221 ms)

I guess that needs a bug of its own: lp:1390388

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

(Re-triggering to see what jobs run and what tests fail)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
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