xpathselect attribute matching doesn't match anything other than object Ids

Bug #1307748 reported by Christopher Lee on 2014-04-14
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Unity
Fix Released
High
Marco Trevisan (Treviño)
7.2
Fix Released
High
Marco Trevisan (Treviño)
unity (Ubuntu)
Undecided
Unassigned
Nominated for Trusty by Christopher Townsend

Bug Description

I came across this issue while testing an autopilot branch of mine.

The xpathselect server-side matching (as opposed to matching in the autopilot python code) is not working as expected.

To reproduce:
  - Save this code as test_selection_attributes.py - http://paste.ubuntu.com/7252495/
  - (with the unity-autopilot package installed) run: `autopilot run test_selection_attributes`

This script contains 2 tests, one passes to prove that it can get a Launcher that has the monitor attribute of 0, the 2nd test attempts to select the Launcher object with attribute monitor=0 and fails.

We see in the unity logs:
 - "Unable to match 'monitor' against property of unknown integer type."

A bit of digging suggests that GetPropertyValue is returning an array of values (Probably: Object type id, Value?) which means that, in MatchIntegerProperty for instance, the values GVariantClass will never be one of the Integer types.

Related branches

Christopher Lee (veebers) wrote :

A simplified single test that should work with multiple screens: http://paste.ubuntu.com/7252628/

Changed in unity:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in unity:
milestone: none → 7.2.1
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 7.2.0+14.10.20140512.4-0ubuntu1

---------------
unity (7.2.0+14.10.20140512.4-0ubuntu1) utopic; urgency=low

  [ Stephen M. Webb ]
  * lockscreen/LockScreenAccelerators.h: added required header for
    std:vector definition
  * disabled precompiled headers on arm64 Ubuntu package builds (LP:
    #1317276)

  [ Brandon Schaefer ]
  * Set the max width, so our static text wraps. So we don't end up
    rendering text out of the view area. (LP: #1312749)

  [ Marco Trevisan (Treviño) ]
  * UnityScreen: toggle activation of all the unity compiz actions when
    locking the screen Also, make sure that the lockscreen views are
    treated as "always-on-front" windows by nux (and this applies to
    both visibility and events).
  * PanelService: emit an invalid EntryActivated signal if the menu
    hasn't actually been shown In addition, if the menu is not visible
    after the first popup call, try to show a menu without keyboard
    focus. This will make possible to see menus also when there's a key-
    grab (although they will be without keyboard support). Finally,
    reset the menu state, if that failed.
  * UnityScreen: always paint the lockscreen above, just add menu and
    onboard as exceptions Some code cleanup, factorizing similar code.
    (LP: #1313280)
  * UnityScreen: don't try to show Dash/Hud if the screen is grabbed
    Also move the dash opening out from LauncherController, and get rid
    of UBus as first initialization source, as it can only slow things
    down here. (LP: #741869)
  * PluginAdapter: make sure we don't try to call an invalid
    initiate/terminate callback function (LP: #1221673)
  * DebugDBusInterface: match properties if they are in the AP array
    form [<type>, <value>] (LP: #1307748)

  [ William Hua ]
  * Add proper support for modifier-only shortcuts on the lock screen.
    (LP: #1291461)

  [ Jinkyu Yi ]
  * Dash: Fix problem at checking blacklisted unicode range (LP:
    #1251193)

  [ Andrea Azzarone ]
  * Add a warning in the session dialog if other sessions are still
    open. (LP: #1281058)
 -- Ubuntu daily release <email address hidden> Mon, 12 May 2014 22:03:27 +0000

Changed in unity (Ubuntu):
status: New → Fix Released

Hello Christopher, or anyone else affected,

Accepted unity into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/unity/7.2.1+14.04.20140513-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Brian Murray (brian-murray) wrote :

Hello Christopher, or anyone else affected,

Accepted unity into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/unity/7.2.1+14.04.20140513-0ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in unity:
milestone: 7.2.1 → 7.3.0
status: In Progress → Fix Committed

ubuntu 14.04-32bit on virtualbox

[test case]
$ autopilot run test_selection_attributes
Loading tests from: /home/testuser/work

Tests running...

* "Autopilot does not end.
* "break was done by "CTRL + C".

[ recheck by proposed package]
* enable trusty-proposed & installed package.

unity:
  Installed: 7.2.1+14.04.20140513-0ubuntu2
  Candidate: 7.2.1+14.04.20140513-0ubuntu2
  Version table:
 *** 7.2.1+14.04.20140513-0ubuntu2 0
        400 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-proposed/main i386 Packages
        100 /var/lib/dpkg/status
     7.2.0+14.04.20140423-0ubuntu1.2 0
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-updates/main i386 Packages
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-security/main i386 Packages
     7.2.0+14.04.20140416-0ubuntu1 0
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty/main i386 Packages

libunity-core-6.0-9:
  Installed: 7.2.1+14.04.20140513-0ubuntu2
  Candidate: 7.2.1+14.04.20140513-0ubuntu2
  Version table:
 *** 7.2.1+14.04.20140513-0ubuntu2 0
        400 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-proposed/main i386 Packages
        100 /var/lib/dpkg/status
     7.2.0+14.04.20140423-0ubuntu1.2 0
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-updates/main i386 Packages
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-security/main i386 Packages
     7.2.0+14.04.20140416-0ubuntu1 0
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty/main i386 Packages

unity-services:
  Installed: 7.2.1+14.04.20140513-0ubuntu2
  Candidate: 7.2.1+14.04.20140513-0ubuntu2
  Version table:
 *** 7.2.1+14.04.20140513-0ubuntu2 0
        400 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-proposed/main i386 Packages
        100 /var/lib/dpkg/status
     7.2.0+14.04.20140423-0ubuntu1.2 0
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-updates/main i386 Packages
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-security/main i386 Packages
     7.2.0+14.04.20140416-0ubuntu1 0
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty/main i386 Packages

unity-autopilot:
  Installed: 7.2.1+14.04.20140513-0ubuntu2
  Candidate: 7.2.1+14.04.20140513-0ubuntu2
  Version table:
 *** 7.2.1+14.04.20140513-0ubuntu2 0
        400 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-proposed/universe i386 Packages
        100 /var/lib/dpkg/status
     7.2.0+14.04.20140423-0ubuntu1.2 0
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-updates/universe i386 Packages
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty-security/universe i386 Packages
     7.2.0+14.04.20140416-0ubuntu1 0
        500 http://ubuntu-ashisuto.ubuntulinux.jp/ubuntu/ trusty/universe i386 Packages

$ autopilot run test_selection_attributes
Loading tests from: /home/testuser/work

Tests running...

Ran 1 test in 1.361s
OK

* Is this result correct?

Christopher Townsend (townsend) wrote :

Hi,

Yes, that is the correct result, so marking this verification-done.

Thanks for testing!

tags: added: verification-done
removed: verification-needed

The verification of the Stable Release Update for unity has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Stephen M. Webb (bregma) on 2014-06-20
Changed in unity:
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