Test suite fails in all versions of Python

Bug #1272359 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Aptdaemon
New
Undecided
Unassigned
aptdaemon (Ubuntu)
Fix Released
High
Unassigned
Trusty
Fix Released
High
Unassigned

Bug Description

Current aptdaemon has several test failures when running under Python 3.4:

  http://people.canonical.com/~pitti/tmp/autopkgtest-py34/fail/py34-aptdaemon/results/

Reproducible in trunk (lp:aptdaemon) with

$ PYTHONPATH=. python3.4 tests/test_worker.py WorkerTestCase.test_install_file WorkerTestCase.test_install_unknown_file
[...]
======================================================================
FAIL: test_install_file (__main__.WorkerTestCase)
Test the installation of a local package file.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_worker.py", line 347, in test_install_file
    trans._error_property[1]))
AssertionError: dbus.String('exit-failed') != 'exit-success' : error-package-manager-failed: debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Keine Berechtigung
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Keine Berechtigung
Selecting previously unselected package silly-base.
(Reading database ... 0 files and directories currently installed.)
Preparing to unpack .../silly-base_0.1-0update1_all.deb ...
Unpacking silly-base (0.1-0update1) ...
Setting up silly-base (0.1-0update1) ...

======================================================================
FAIL: test_install_unknown_file (__main__.WorkerTestCase)
Test the installation of a local package file which is not known
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/test_worker.py", line 394, in test_install_unknown_file
    trans._error_property[1]))
AssertionError: dbus.String('exit-failed') != 'exit-success' : error-package-manager-failed:

This also failed in autopkgtest, but works in trunk:

  $ PYTHONPATH=. python3.4 tests/test_pk.py PackageKitTest.test_install_files

that maybe because trunk has been fixed for that, or the test is flaky.

Revision history for this message
Martin Pitt (pitti) wrote :

Since python 3.4 has been made the default this has broken aptdaemon; this is now also holding back other packages in -proposed, so bumping severity.

https://jenkins.qa.ubuntu.com/view/Trusty/view/AutoPkgTest/job/trusty-adt-aptdaemon/42/ARCH=i386,label=adt/console is a current log of the failures.

Changed in aptdaemon (Ubuntu Trusty):
importance: Undecided → High
milestone: none → ubuntu-14.04-beta-2
status: New → Triaged
Barry Warsaw (barry)
Changed in aptdaemon (Ubuntu Trusty):
assignee: nobody → Barry Warsaw (barry)
Barry Warsaw (barry)
Changed in aptdaemon (Ubuntu Trusty):
status: Triaged → In Progress
Revision history for this message
Barry Warsaw (barry) wrote :

Note that the trunk test case above *also* fails for me with python3.3.

Revision history for this message
Barry Warsaw (barry) wrote :

I'm having a difficult time reproducing this locally for debugging. The tests hang when using adt-virt-schroot and crash qemu when using adt-virt-qemu. Haven't tried lxc yet -- just providing status.

Revision history for this message
Barry Warsaw (barry) wrote :

After further investigation, I've found that the aptdaemon test suite does not pass in any of 2.7, 3.3, or 3.4. Neither the trusty source branch, nor the upstream trunk passes all its tests. This doesn't ftbfs the package because if you look at d/rules, you'll see that non-zero exits are ignored. As aptdaemon isn't stuck in -proposed (this came up in an archive rebuild), I am not going to spend more time on it for now.

I had suggested we simply disable the DEP 8 tests, but that just increases the tech debt on this package. So for now, we'll just wait on upstream to look into the issue.

Changed in aptdaemon (Ubuntu Trusty):
status: In Progress → New
importance: High → Undecided
assignee: Barry Warsaw (barry) → nobody
milestone: ubuntu-14.04-beta-2 → none
summary: - needs porting to Python 3.4
+ Test suite fails in all versions of Python
tags: removed: python3.4
Revision history for this message
Brian Murray (brian-murray) wrote :

mvo ended up fixing this:

aptdaemon (1.1.1-1ubuntu5) trusty; urgency=low

  * debian/python3-aptdaemon.test.install:
    - install all test deb files
  * debian/patches/dbus_timeout.patch:
    - fix pep8 issue
  * debian/patches/fix-configparser.patch:
    - do not crash when "#" are in comments
  * debian/patches/py3_inheritable.patch:
    - set status-fds inheritable to fix InstallFiles()
  * debian/tests/control:
    - add missing fakeroot dependency
    - add missing lintian dependency
 -- Michael Vogt <email address hidden> Fri, 11 Apr 2014 14:48:52 +0200

Changed in aptdaemon (Ubuntu Trusty):
status: New → Fix Released
importance: Undecided → High
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.