Mir

[ FAILED ] RaiseSurfaces.key_event_with_cookie

Bug #1655293 reported by Daniel van Vugt on 2017-01-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Medium
Alan Griffiths
mir (Ubuntu)
Undecided
Unassigned

Bug Description

08:59:51 11: /<<BUILDDIR>>/mir-0.26.0+zesty3446bzr3915/tests/acceptance-tests/test_surface_raise.cpp:198: Failure
08:59:51 11: Expected: mir_surface_get_focus(surface2)
08:59:51 11: Which is: 0
08:59:51 11: To be equal to: mir_surface_focused
08:59:51 11: Which is: 1
08:59:56 11: [2017-01-10 08:59:56.047566] mirserver: Stopping
08:59:56 11: [ FAILED ] RaiseSurfaces.key_event_with_cookie (5757 ms)

https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/3416/consoleFull

Related branches

Alan Griffiths (alan-griffiths) wrote :
Download full text (3.1 KiB)

And twice more, https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/3419/consoleFull

10:46:24 11: [ RUN ] RaiseSurfaces.key_event_with_cookie
10:46:24 11: [2017-01-10 10:46:24.825849] mirserver: Starting
10:46:24 11: [2017-01-10 10:46:24.830229] mirserver: Selected driver: mir:stub-graphics (version 0.26.0)
10:46:25 11: [2017-01-10 10:46:25.097738] mirserver: Using software cursor
10:46:25 11: [2017-01-10 10:46:25.175517] mirserver: Selected input driver: mir:stub-input (version: 0.26.0)
10:46:25 11: [2017-01-10 10:46:25.178580] mirserver: Mir version 0.26.0
10:46:25 11: [2017-01-10 10:46:25.381160] mirserver: Initial display configuration:
10:46:25 11: [2017-01-10 10:46:25.381572] mirserver: Output 1: VGA connected, used
10:46:25 11: [2017-01-10 10:46:25.381822] mirserver: Physical size 0.0" 0x0mm
10:46:25 11: [2017-01-10 10:46:25.382043] mirserver: Power is on
10:46:25 11: [2017-01-10 10:46:25.382539] mirserver: Current mode 1600x1600 60.00Hz
10:46:25 11: [2017-01-10 10:46:25.382830] mirserver: Preferred mode 1600x1600 60.00Hz
10:46:25 11: [2017-01-10 10:46:25.383077] mirserver: Orientation normal
10:46:25 11: [2017-01-10 10:46:25.383337] mirserver: Logical size 1600x1600
10:46:25 11: [2017-01-10 10:46:25.383541] mirserver: Logical position +0+0
10:46:26 11: /<<BUILDDIR>>/mir-0.26.0+xenial3449bzr3918/tests/acceptance-tests/test_surface_raise.cpp:198: Failure
10:46:26 11: Value of: mir_surface_focused
10:46:26 11: Actual: 1
10:46:26 11: Expected: mir_surface_get_focus(surface2)
10:46:26 11: Which is: 0
10:46:30 11: [2017-01-10 10:46:30.878838] mirserver: Stopping
10:46:30 11: [ FAILED ] RaiseSurfaces.key_event_with_cookie (6136 ms)

...

10:52:09 [ RUN ] RaiseSurfaces.key_event_with_cookie
10:52:09 [2017-01-10 10:46:24.825849] mirserver: Starting
10:52:09 [2017-01-10 10:46:24.830229] mirserver: Selected driver: mir:stub-graphics (version 0.26.0)
10:52:09 [2017-01-10 10:46:25.097738] mirserver: Using software cursor
10:52:09 [2017-01-10 10:46:25.175517] mirserver: Selected input driver: mir:stub-input (version: 0.26.0)
10:52:09 [2017-01-10 10:46:25.178580] mirserver: Mir version 0.26.0
10:52:09 [2017-01-10 10:46:25.381160] mirserver: Initial display configuration:
10:52:09 [2017-01-10 10:46:25.381572] mirserver: Output 1: VGA connected, used
10:52:09 [2017-01-10 10:46:25.381822] mirserver: Physical size 0.0" 0x0mm
10:52:09 [2017-01-10 10:46:25.382043] mirserver: Power is on
10:52:09 [2017-01-10 10:46:25.382539] mirserver: Current mode 1600x1600 60.00Hz
10:52:09 [2017-01-10 10:46:25.382830] mirserver: Preferred mode 1600x1600 60.00Hz
10:52:09 [2017-01-10 10:46:25.383077] mirserver: Orientation normal
10:52:09 [2017-01-10 10:46:25.383337] mirserver: Logical size 1600x1600
10:52:09 [2017-01-10 10:46:25.383541] mirserver: Logical position +0+0
10:52:09 /<<BUILDDIR>>/mir-0.26.0+xenial3449bzr3918/tests/acceptance-tests/test_surface_raise.cpp:198: Failure
10:52:09 Value of: mir_surface_focused
10:52:09 Actual: 1
10:52:09 Expected: mir_surface_get_focus(surface2)
10:52:09 Which is: 0
10:52:09 [2017-01-10 10:46:30.878838] mirserver: Stopping
10:52:09 [ FAILED ] RaiseSurfaces.key_event_with...

Read more...

Changed in mir:
status: New → Triaged
Alan Griffiths (alan-griffiths) wrote :

TEST_F(RaiseSurfaces, key_event_with_cookie)
{
    fake_keyboard->emit_event(mis::a_key_down_event().of_scancode(KEY_M));

    int events = 1;
    if (wait_for_n_events(events, this))
    {
        std::lock_guard<std::mutex> lk(mutex);
        ASSERT_FALSE(out_cookies.empty());
        EXPECT_EQ(mir_surface_get_focus(surface2), mir_surface_focused);

        MirCookie const* cookie = mir_cookie_from_buffer(out_cookies.back().data(), out_cookies.back().size());
        attempt_focus(surface2, cookie);

        mir_cookie_release(cookie);
    }
}

WTF is this test intended to test?

The fixture creates two fullscreen surfaces and paints the default bufferstream. (I think that we're in the process of breaking that technique.)

Then we synthesise a keyboard event and wait for to reach the client.

If we don't see the event, then the test *passes*. That seems wrong.

If we do see the event we check that the second surface has focus. Why do we EXPECT that? That isn't what this test is about! And /this/ is the expectation that fails.

We then try raising surface2 and wait for it to have focus (which, we've just established it has).

Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
milestone: none → 0.26.0
Alan Griffiths (alan-griffiths) wrote :

Actually, I misread - wait_for_n_events() reports an error if we don't see the event.

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

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.26.0

Changed in mir:
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :
Download full text (7.2 KiB)

This bug was fixed in the package mir - 0.26.0+17.04.20170126.3-0ubuntu1

---------------
mir (0.26.0+17.04.20170126.3-0ubuntu1) zesty; urgency=medium

  [ Daniel van Vugt ]
  * New upstream release 0.26.0 (https://launchpad.net/mir/+milestone/0.26.0)
    - ABI summary:
      . mirclient ABI unchanged at 9
      . mirserver ABI bumped to 43
      . mircommon ABI unchanged at 7
      . mirplatform ABI unchanged at 14
      . mirprotobuf ABI unchanged at 3
      . mirplatformgraphics ABI unchanged at 11
      . mirclientplatform ABI unchanged at 5
      . mirinputplatform ABI unchanged at 6
      . mircore ABI unchanged at 1
    - Enhancements:
      . New/improved toolkit APIs: MirInputConfig and related functions,
        MirWindow and related functions, DisplayConfig and related functions,
        MirScreencastSpec and related functions,
      . Support for configuring input configuration
      . Introduce toolkit extension mechanism for platform specific APIs.
      . Toolkit extensions for: mesa_drm_auth, set_gbm_device and
        window_coordinate_translation
      . Screencasting to a specific MirBuffer.
      . Add DisplayConfigurationController::base_configuration() so downstreams
        can get the base configuration. (Weirdly they can already set it.).
      . x11 platform: allow adjustable scale parameter.
      . Added EDID support: client API, server logging and in mirout.
      . mirout: Add newer attributes only available in the new display
        config API: scaling factor, subpixel arrangement and form factor.
      . mirout: Log the orientation and logical size of each output too.
      . Replace the mir::Server-overridable Reports with Observers.
      . Add xkbcommon to mirclient.pc Requires.private.
      . Deprecate legacy toolkit APIs that will be removed in Mir 1.0
      . Introduced 'client-side vsync', which dramatically reduces latency
        from the client to the screen (particularly for nested servers like
        Unity8).
    - Bugs fixed:
      . [performance] Restore support for better-than-triple buffering by
        default. (LP: #1240909)
      . Frame rate is artificially low on Diamondville Intel Atom systems due
        to aggressive power management (LP: #1388490)
      . [testsfail] failure in CI in
        AndroidInputReceiverSetup.slow_raw_input_doesnt_cause_frameskipping
        (LP: #1394369)
      . [trusted prompt sessions] Can't open two prompt sessions at the same
        time (LP: #1494197)
      . Changing scale, formFactor or DPI in display configuration causes
        renderer teardown/recreate unnecessarily (LP: #1556142)
      . [testsfail] ApplicationNotRespondingDetection.failure_to_pong_is_
        noticed (LP: #1570327)
      . CI failure in TestClientInput.receives_one_touch_event_per_frame
        (LP: #1570698)
      . Mir-on-X mouse input is jerky/stuttery compared to Mir-on-KMS
        (LP: #1576600)
      . [regression] Two fingers in mir_proving_server now resizes/moves app
        windows (two finger apps unusable) (LP: #1586311)
      . Pointer/cursor input lag in unity8 session (LP: #1591328)
      . PointerConfinement.test_we_update_our_confined_region_on_a_resize
      ...

Read more...

Changed in mir (Ubuntu):
status: New → Fix Released
Changed in mir:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers