touch tests failing because unlock screen fails

Bug #1238298 reported by Francis Ginther
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
jenkins-launchpad-plugin
Fix Released
Critical
Francis Ginther

Bug Description

Nearly all (95%?) are failing due to problems unlocking the screen. There are two recurring stack traces:

[stack1]
0 upgraded, 0 newly installed, 0 to remove and 92 not upgraded.
unity8 stop/waiting
Traceback (most recent call last):
  File "/home/phablet/autopilot-testrunner/unlock_screen.py", line 3, in <module>
    from autopilot import introspection
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/__init__.py", line 36, in <module>
    import psutil
  File "/usr/lib/python2.7/dist-packages/psutil/__init__.py", line 65, in <module>
    import psutil._pslinux as _psplatform
  File "/usr/lib/python2.7/dist-packages/psutil/_pslinux.py", line 87, in <module>
    _TERMINAL_MAP = _psposix._get_terminal_map()
  File "/usr/lib/python2.7/dist-packages/psutil/_psposix.py", line 117, in _get_terminal_map
    ret[os.stat(name).st_rdev] = name

[stack2]
ERROR:dbus.proxies:Introspect error on :1.38:/com/canonical/Autopilot/Introspection: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
Traceback (most recent call last):
  File "/home/phablet/autopilot-testrunner/unlock_screen.py", line 97, in <module>
    unlock_screen()
  File "/home/phablet/autopilot-testrunner/unlock_screen.py", line 57, in unlock_screen
    unity8 = introspection.get_proxy_object_for_existing_process(connection_name=conn)
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/__init__.py", line 271, in get_proxy_object_for_existing_process
    raise ProcessSearchError("Search criteria returned no results")
autopilot.introspection.ProcessSearchError: Search criteria returned no results

Revision history for this message
Francis Ginther (fginther) wrote :

I'm not able to reproduce the stack traces on my local system, but I do see that the screen often does not come up at the start of a test run.

Inspection of the device shows a unity8 crash occurring during the unlock_screen code. But unity8 was coming up with "-testability". Eventually, I was able to get a more reliable environment by inserting a delay in the unlock between the unity8 restart and the actual swipe.

Revision history for this message
I Ahmad (iahmad) wrote :

Francis, there is this change landed in unity8 bazaar.launchpad.net/~unity-team/unity8/trunk/revision/422, which will make the screen unlocked on application launch. I have tried it and it works though it won't turn the display on if it is off.

Changed in jenkins-launchpad-plugin:
assignee: nobody → Francis Ginther (fginther)
importance: Undecided → Critical
status: New → Fix Released
Revision history for this message
Francis Ginther (fginther) wrote :

Iftikhar,

I followed up with Saviq on the screen unlock:
Oct 14 15:57:45 <fginther> Saviq, what about unlocking the screen, does tha
t even apply?
Oct 14 15:57:58 <Saviq> fginther, for unity8 it does not
Oct 14 15:58:05 <Saviq> fginther, I mean for the unity8 suite
Oct 14 15:58:24 <fginther> Saviq, thanks, (and I was referring to unity8-au
topilot as well)
Oct 14 15:58:27 <Saviq> fginther, and even for apps you shouldn't need that temp
orarily
Oct 14 15:58:40 <Saviq> as we'll unlock when an app is launched behind the greet
er
Oct 14 15:59:00 <fginther> Saviq, yeah!
Oct 14 15:59:04 <Saviq> but we'll be locking this down at some point soon to plu
g that security hole ;)
Oct 14 15:59:16 <fginther> oh well
Oct 14 15:59:31 <Saviq> fginther, but at that point we should have all apps transitioned to unity8
Oct 14 15:59:36 <Saviq> s/unity8/upstart/
Oct 14 15:59:56 <Saviq> and then in the suite you'd restart unity8 under testability
Oct 14 16:00:04 <Saviq> and use unity8's emulator to unlock
Oct 14 16:00:11 <Saviq> so no more blindness

So, this feature appears to be short lived, but ultimately replaced by the apps unlocking the device within the test. Once this is all in place, we can then throw away the unlock code.

Revision history for this message
Francis Ginther (fginther) wrote :
Revision history for this message
Francis Ginther (fginther) wrote :

This is a recurring problem again (although not every run this time):
https://bugs.launchpad.net/jenkins-launchpad-plugin/+bug/1241152

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.