Merge lp:~aacid/autopilot/precreate_keyboard15 into lp:autopilot/1.5

Proposed by Albert Astals Cid on 2015-03-26
Status: Rejected
Rejected by: Christopher Lee on 2015-04-02
Proposed branch: lp:~aacid/autopilot/precreate_keyboard15
Merge into: lp:autopilot/1.5
Diff against target: 22 lines (+1/-3)
1 file modified
autopilot/testcase.py (+1/-3)
To merge this branch: bzr merge lp:~aacid/autopilot/precreate_keyboard15
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2015-03-26
Leo Arias 2015-03-26 Pending
Thomi Richards 2015-03-26 Pending
Autopilot Hackers 2015-03-26 Pending
Review via email: mp+254209@code.launchpad.net

Commit Message

Create keyboard well before it's going to be used

Otherwise it can cause races when using the uinput keyboard in mir, e.g.

    Mir log says
      [1427285878.342107] android-input: [EventHub]New device: id=18, fd=66, path='/dev/input/event8', name='py-evdev-uinput', classes=0x80000063, configuration='', keyLayout='Generic.kl', keyCharacterMap='Generic.kcm', builtinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=true

    autopilot log says
      12:17:58.305 DEBUG _uinput:60 - Pressing p (25).

25 March 2015 12:17:58.305 is 1427285878.305, that is, the key press is sent 37 milliseconds before mir sees the device, so that key press is lost

Description of the Change

Fix unstable unity8.shell.tests.test_lock_screen.TestLockscreen.test_can_unlock_passphrase_screen test

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:509
http://jenkins.qa.ubuntu.com/job/autopilot-1.5-ci/21/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-1.5-vivid-amd64-ci/7
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-1.5-vivid-amd64-ci/7/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-1.5-vivid-armhf-ci/7
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-1.5-vivid-armhf-ci/7/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-1.5-vivid-i386-ci/7
        deb: http://jenkins.qa.ubuntu.com/job/autopilot-1.5-vivid-i386-ci/7/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/1983/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-vivid-autopilot/143
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-mako/1749/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/1981
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/1981/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/19188
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-vivid-autopilot/145
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-amd64/897
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-amd64/897/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/autopilot-1.5-ci/21/rebuild

review: Approve (continuous-integration)
Christopher Lee (veebers) wrote :

Rejected as this MP isn't needed. Due to the slightly obscure way that autopilot trunk is released (i.e. merged into this one) the code is merged into lp:autopilot then at landing time merged into lp:autopilot/1.5

Unmerged revisions

509. By Albert Astals Cid on 2015-03-26

Create keyboard well before it's going to be used

Otherwise it can cause races when using the uinput keyboard in mir, e.g.

    Mir log says
      [1427285878.342107] android-input: [EventHub]New device: id=18, fd=66, path='/dev/input/event8', name='py-evdev-uinput', classes=0x80000063, configuration='', keyLayout='Generic.kl', keyCharacterMap='Generic.kcm', builtinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=true

    autopilot log says
      12:17:58.305 DEBUG _uinput:60 - Pressing p (25).

25 March 2015 12:17:58.305 is 1427285878.305, that is, the key press is sent 37 milliseconds before mir sees the device, so that key press is lost

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'autopilot/testcase.py'
2--- autopilot/testcase.py 2014-09-05 04:58:58 +0000
3+++ autopilot/testcase.py 2015-03-26 08:31:51 +0000
4@@ -161,8 +161,8 @@
5
6 self._process_manager = None
7 self._mouse = None
8- self._kb = None
9 self._display = None
10+ self._kb = Keyboard.create()
11
12 # Work around for bug lp:1297592.
13 _ensure_uinput_device_created()
14@@ -185,8 +185,6 @@
15
16 @property
17 def keyboard(self):
18- if self._kb is None:
19- self._kb = Keyboard.create()
20 return self._kb
21
22 @property

Subscribers

People subscribed via source and target branches