Mir

Merge lp:~alan-griffiths/mir/workaround-1523621 into lp:mir

Proposed by Alan Griffiths
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 3195
Proposed branch: lp:~alan-griffiths/mir/workaround-1523621
Merge into: lp:mir
Diff against target: 51 lines (+12/-9)
1 file modified
tests/acceptance-tests/test_nested_mir.cpp (+12/-9)
To merge this branch: bzr merge lp:~alan-griffiths/mir/workaround-1523621
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+280483@code.launchpad.net

Commit message

tests: Workaround racy test setup in NestedServer.*_cursor*

Description of the change

tests: Workaround racy test setup in NestedServer.*_cursor*

I'd love to find a better solution, but this workaround is the best I have today.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:3194
http://jenkins.qa.ubuntu.com/job/mir-ci/5846/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-android-vivid-i386-build/5308
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-clang-vivid-amd64-build/4214
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-vivid-touch/5257
    FAILURE: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-xenial-touch/156/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-xenial-amd64-ci/174
        deb: http://jenkins.qa.ubuntu.com/job/mir-xenial-amd64-ci/174/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-xenial-i386-ci/174
        deb: http://jenkins.qa.ubuntu.com/job/mir-xenial-i386-ci/174/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-vivid-armhf/5257
        deb: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-vivid-armhf/5257/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-runner-touch/7777
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26041
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-xenial-armhf/154
        deb: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-xenial-armhf/154/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-runner-xenial-touch/13/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26044

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/mir-ci/5846/rebuild

review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think our test/build machines are often too slow (or running valgrind) for 10ms to make a reliable difference. So it should possibly be higher. But it's a start...

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Hmm, the bug(s) in question are slowing down other MPs still. I might just land this and see what happens.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/acceptance-tests/test_nested_mir.cpp'
2--- tests/acceptance-tests/test_nested_mir.cpp 2015-12-11 03:18:13 +0000
3+++ tests/acceptance-tests/test_nested_mir.cpp 2015-12-14 17:46:15 +0000
4@@ -630,11 +630,12 @@
5 ClientWithAPaintedSurfaceAndABufferStream client(nested_mir);
6 auto const mock_cursor = the_mock_cursor();
7
8- client.update_surface_spec(
9- [](MirSurfaceSpec* spec) { mir_surface_spec_set_fullscreen_on_output(spec, 1); });
10-
11 server.the_cursor_listener()->cursor_moved_to(489, 9);
12
13+ // TODO workaround for lp:1523621
14+ // (I don't see a way to detect that the host has placed focus on "Mir nested display for output #1")
15+ std::this_thread::sleep_for(10ms);
16+
17 {
18 mt::WaitCondition condition;
19 EXPECT_CALL(*mock_cursor, show(_)).Times(1)
20@@ -668,11 +669,12 @@
21 ClientWithAPaintedSurface client(nested_mir);
22 auto const mock_cursor = the_mock_cursor();
23
24- client.update_surface_spec(
25- [](MirSurfaceSpec* spec) { mir_surface_spec_set_fullscreen_on_output(spec, 1); });
26-
27 server.the_cursor_listener()->cursor_moved_to(489, 9);
28
29+ // TODO workaround for lp:1523621
30+ // (I don't see a way to detect that the host has placed focus on "Mir nested display for output #1")
31+ std::this_thread::sleep_for(10ms);
32+
33 for (auto const name : cursor_names)
34 {
35 mt::WaitCondition condition;
36@@ -697,11 +699,12 @@
37 ClientWithAPaintedSurfaceAndABufferStream client(nested_mir);
38 auto const mock_cursor = the_mock_cursor();
39
40- client.update_surface_spec(
41- [](MirSurfaceSpec* spec) { mir_surface_spec_set_fullscreen_on_output(spec, 1); });
42-
43 server.the_cursor_listener()->cursor_moved_to(489, 9);
44
45+ // TODO workaround for lp:1523621
46+ // (I don't see a way to detect that the host has placed focus on "Mir nested display for output #1")
47+ std::this_thread::sleep_for(10ms);
48+
49 {
50 mt::WaitCondition condition;
51 EXPECT_CALL(*mock_cursor, show(_)).Times(1)

Subscribers

People subscribed via source and target branches