Mir

Merge lp:~alan-griffiths/mir/fix-1709666 into lp:mir

Proposed by Alan Griffiths on 2017-08-10
Status: Merged
Merged at revision: 4224
Proposed branch: lp:~alan-griffiths/mir/fix-1709666
Merge into: lp:mir
Diff against target: 55 lines (+11/-7)
2 files modified
tests/acceptance-tests/test_nested_mir.cpp (+10/-6)
tests/mir_test_framework/server_runner.cpp (+1/-1)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-1709666
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Needs Fixing on 2017-08-11
Chris Halse Rogers 2017-08-10 Approve on 2017-08-11
Review via email: mp+328835@code.launchpad.net

Commit message

Look for the last of a series of synthetic events to ensure that the queue is drained before the test exits. (LP: #1709666)

To post a comment you must log in.
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4222
https://mir-jenkins.ubuntu.com/job/mir-ci/3547/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4855/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5056
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5045
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5045
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5045
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4892
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4892/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4892
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4892/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4892
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4892/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4892
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4892/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4892/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4892
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4892/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4892
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4892/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4892
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4892/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3547/rebuild

review: Needs Fixing (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4222
https://mir-jenkins.ubuntu.com/job/mir-ci/3549/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4858/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5059
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5048
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5048
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5048
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4895
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4895/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4895
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4895/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4895
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4895/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4895
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4895/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4895
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4895/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4895
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4895/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4895
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4895/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4895/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3549/rebuild

review: Needs Fixing (continuous-integration)
Alan Griffiths (alan-griffiths) wrote :

Eugh!

14:47:20 15: [ RUN ] FocusSelection.when_client_connects_shell_is_notified_of_session
14:47:22 15: [2017-08-10 14:47:22.572677] mirplatform: Found graphics driver: mir:mesa-x11 (version 1.0.0)
...
14:47:39 15: [2017-08-10 14:47:39.489932] mirserver: . |_ Scaling factor: 1.00
14:47:41 15: ==12654== Thread 2:
14:47:41 15: ==12654== Conditional jump or move depends on uninitialised value(s)
14:47:41 15: ==12654== at 0x471C837: pthread_mutex_lock (pthread_mutex_lock.c:71)
14:47:41 15: ==12654== by 0x8D7E886: __gthread_mutex_lock(pthread_mutex_t*) (gthr-default.h:748)
14:47:41 15: ==12654== by 0x8D81B9F: std::mutex::lock() (mutex:135)
14:47:41 15: ==12654== by 0x8E556C0: std::lock_guard<std::mutex>::lock_guard(std::mutex&) (mutex:386)
14:47:41 15: ==12654== by 0x92BD6F6: mir_test_framework::ServerRunner::start_mir_server()::{lambda()#1}::operator()() const::{lambda(mir::DisplayServer&)#1}::operator()(mir::DisplayServer) const::{lambda()#1}::operator()() const (server_runner.cpp:117)

OK, so "started_cv.wait_for(lock, std::chrono::seconds{10}, [&]{ return started; });" has timed out, the function has exited and then the "main loop" has attempted to lock the local variable.

Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4224
https://mir-jenkins.ubuntu.com/job/mir-ci/3550/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4859
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5060
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5049
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5049
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5049
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4896
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4896/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4896
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4896/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4896
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4896/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4896
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4896/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4896
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4896/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4896
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4896/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4896
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4896/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4896
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4896/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3550/rebuild

review: Approve (continuous-integration)
Chris Halse Rogers (raof) wrote :

LGTM

review: Approve
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/1384/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4861
    FAILURE: https://mir-jenkins.ubuntu.com/job/generic-land-mp/1500/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/1501/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5064
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5053
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5053
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5053
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4898
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/4898/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4898
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4898/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4898
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/4898/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4898
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/4898/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4898
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4898/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4898
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/4898/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4898
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4898/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4898
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/4898/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Alan Griffiths (alan-griffiths) wrote :

Another "failed" merge that landed. :(

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 2017-07-28 17:00:43 +0000
3+++ tests/acceptance-tests/test_nested_mir.cpp 2017-08-10 16:05:32 +0000
4@@ -289,13 +289,15 @@
5 [this]
6 {
7 if (surface_ready) return true;
8- fake_input_device->emit_event(
9- mi::synthesis::a_key_down_event().of_scancode(KEY_A));
10- fake_input_device->emit_event(
11- mi::synthesis::a_key_up_event().of_scancode(KEY_A));
12+ ++probe_scancode;
13+ fake_input_device->emit_event(
14+ mi::synthesis::a_key_down_event().of_scancode(probe_scancode));
15+ fake_input_device->emit_event(
16+ mi::synthesis::a_key_up_event().of_scancode(probe_scancode));
17 return false;
18 },
19- std::chrono::seconds{5});
20+ std::chrono::seconds{5},
21+ std::chrono::seconds{1});
22
23 EXPECT_TRUE(dummy_events_received);
24
25@@ -329,7 +331,8 @@
26 if (mir_input_event_get_type(iev) == mir_input_event_type_key)
27 {
28 auto const kev = mir_input_event_get_keyboard_event(iev);
29- if (mir_keyboard_event_scan_code(kev) == KEY_A)
30+ if (mir_keyboard_event_scan_code(kev) == nmr->probe_scancode &&
31+ mir_keyboard_event_action(kev) ==mir_keyboard_action_up)
32 nmr->surface_ready = true;
33 }
34 }
35@@ -341,6 +344,7 @@
36 "test-devce", "test-device",
37 mi::DeviceCapability::pointer | mi::DeviceCapability::keyboard | mi::DeviceCapability::alpha_numeric})};
38 std::atomic<bool> surface_ready{false};
39+ std::atomic<int> probe_scancode{KEY_A};
40 };
41
42 struct NestedServer : mtf::HeadlessInProcessServer
43
44=== modified file 'tests/mir_test_framework/server_runner.cpp'
45--- tests/mir_test_framework/server_runner.cpp 2017-07-28 17:00:43 +0000
46+++ tests/mir_test_framework/server_runner.cpp 2017-08-10 16:05:32 +0000
47@@ -127,7 +127,7 @@
48 });
49
50 std::unique_lock<std::mutex> lock(mutex);
51- started_cv.wait_for(lock, std::chrono::seconds{10}, [&]{ return started; });
52+ started_cv.wait_for(lock, std::chrono::seconds{30}, [&]{ return started; });
53
54 return ml;
55 }

Subscribers

People subscribed via source and target branches