QStandardPaths::RuntimeLocation returns empty string under pbuilder

Bug #1614108 reported by Alberto Mardegan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
webapps-sprint
Fix Released
High
Alberto Mardegan
qtbase-opensource-src (Ubuntu)
New
Undecided
Unassigned
ubuntu-system-settings-online-accounts (Ubuntu)
Fix Released
Critical
Alberto Mardegan

Bug Description

The unit tests for ubuntu-system-settings-online-accounts are failing when run under pbuilder:

==================
task-0: ********* Start testing of UiProxyTest *********
task-0: Config: Using QtTest library 5.5.1, Qt 5.5.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.1 20160519)
task-0: PASS : UiProxyTest::initTestCase()
task-0: PASS : UiProxyTest::testInit()
task-0: QWARN : UiProxyTest::testRequest(success) QStandardPaths: wrong ownership on runtime directory /run/user/1001, -2 instead of 1234
task-0: QWARN : UiProxyTest::testRequest(success) Couldn't setup IPC socket
task-0: FAIL! : UiProxyTest::testRequest(success) '(!remoteProcesses.isEmpty())' returned FALSE. ()
task-0: Loc: [tst_ui_proxy.cpp(319)]
==================

I've debugged the issue, and I've verified that QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation) is returning an empty string. Although it's documented that in some systems that function can return NULL, it would be better if it didn't :-)

Related branches

Alberto Mardegan (mardy)
Changed in ubuntu-system-settings-online-accounts (Ubuntu):
assignee: nobody → Alberto Mardegan (mardy)
status: New → In Progress
importance: Undecided → Critical
Changed in webapps-sprint:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Alberto Mardegan (mardy)
milestone: none → sprint-26
Revision history for this message
Alberto Mardegan (mardy) wrote :

I investigated this bug, and it happens because QFileInfo::ownerId() returns -2 while inspecting the runtime directory. The documentation says:

    On Windows and on systems where files do not have owners this
    function returns ((uint) -2).

It's not clear though, why would this be returning -2 under pbuilder, given that the filesystem seems to support ownership.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-system-settings-online-accounts - 0.7+16.10.20161004-0ubuntu1

---------------
ubuntu-system-settings-online-accounts (0.7+16.10.20161004-0ubuntu1) yakkety; urgency=medium

  * Tests: create runtime directory, fix execution under pbuilder (LP:
    #1614108)
  * Build-Depend on upstart to avoid s390x builds on yakkety.

 -- Alberto Mardegan <email address hidden> Tue, 04 Oct 2016 09:33:35 +0000

Changed in ubuntu-system-settings-online-accounts (Ubuntu):
status: In Progress → Fix Released
David Barth (dbarth)
Changed in webapps-sprint:
milestone: sprint-26 → sprint-27
Alberto Mardegan (mardy)
Changed in webapps-sprint:
status: In Progress → Fix Released
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.