Mir

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

Proposed by Alan Griffiths
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
Chris Halse Rogers Approve
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.
Revision history for this message
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)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :
Revision history for this message
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)
Revision history for this message
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.

Revision history for this message
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)
Revision history for this message
Chris Halse Rogers (raof) wrote :

LGTM

review: Approve
Revision history for this message
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)
Revision history for this message
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
=== modified file 'tests/acceptance-tests/test_nested_mir.cpp'
--- tests/acceptance-tests/test_nested_mir.cpp 2017-07-28 17:00:43 +0000
+++ tests/acceptance-tests/test_nested_mir.cpp 2017-08-10 16:05:32 +0000
@@ -289,13 +289,15 @@
289 [this]289 [this]
290 {290 {
291 if (surface_ready) return true;291 if (surface_ready) return true;
292 fake_input_device->emit_event(292 ++probe_scancode;
293 mi::synthesis::a_key_down_event().of_scancode(KEY_A));293 fake_input_device->emit_event(
294 fake_input_device->emit_event(294 mi::synthesis::a_key_down_event().of_scancode(probe_scancode));
295 mi::synthesis::a_key_up_event().of_scancode(KEY_A));295 fake_input_device->emit_event(
296 mi::synthesis::a_key_up_event().of_scancode(probe_scancode));
296 return false;297 return false;
297 },298 },
298 std::chrono::seconds{5});299 std::chrono::seconds{5},
300 std::chrono::seconds{1});
299301
300 EXPECT_TRUE(dummy_events_received);302 EXPECT_TRUE(dummy_events_received);
301303
@@ -329,7 +331,8 @@
329 if (mir_input_event_get_type(iev) == mir_input_event_type_key)331 if (mir_input_event_get_type(iev) == mir_input_event_type_key)
330 {332 {
331 auto const kev = mir_input_event_get_keyboard_event(iev);333 auto const kev = mir_input_event_get_keyboard_event(iev);
332 if (mir_keyboard_event_scan_code(kev) == KEY_A)334 if (mir_keyboard_event_scan_code(kev) == nmr->probe_scancode &&
335 mir_keyboard_event_action(kev) ==mir_keyboard_action_up)
333 nmr->surface_ready = true;336 nmr->surface_ready = true;
334 }337 }
335 }338 }
@@ -341,6 +344,7 @@
341 "test-devce", "test-device",344 "test-devce", "test-device",
342 mi::DeviceCapability::pointer | mi::DeviceCapability::keyboard | mi::DeviceCapability::alpha_numeric})};345 mi::DeviceCapability::pointer | mi::DeviceCapability::keyboard | mi::DeviceCapability::alpha_numeric})};
343 std::atomic<bool> surface_ready{false};346 std::atomic<bool> surface_ready{false};
347 std::atomic<int> probe_scancode{KEY_A};
344};348};
345349
346struct NestedServer : mtf::HeadlessInProcessServer350struct NestedServer : mtf::HeadlessInProcessServer
347351
=== modified file 'tests/mir_test_framework/server_runner.cpp'
--- tests/mir_test_framework/server_runner.cpp 2017-07-28 17:00:43 +0000
+++ tests/mir_test_framework/server_runner.cpp 2017-08-10 16:05:32 +0000
@@ -127,7 +127,7 @@
127 });127 });
128128
129 std::unique_lock<std::mutex> lock(mutex);129 std::unique_lock<std::mutex> lock(mutex);
130 started_cv.wait_for(lock, std::chrono::seconds{10}, [&]{ return started; });130 started_cv.wait_for(lock, std::chrono::seconds{30}, [&]{ return started; });
131131
132 return ml;132 return ml;
133}133}

Subscribers

People subscribed via source and target branches