Testsuite fails under lucid

Bug #709895 reported by Loïc Minier on 2011-01-29
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Invalid
Medium
Loïc Minier
apt (Ubuntu)
Medium
Unassigned
Lucid
Medium
Loïc Minier

Bug Description

Hey

I backported various packages to lucid in the ~linaro-maitainers/tools PPA and in my own ~lool PPA and managed to get the package mostly building, but the testsuite fails as follows:

make[1]: Entering directory `/build/buildd/linaro-image-tools-0.4.2'
# XXX: The test-suite currently fails on Lucid. What can we do about
# it?
python -m testtools.run tests.test_suite
tar: Removing leading `/' from member names
Tests running...
======================================================================
FAIL: hwpack.tests.test_builder.HardwarePackBuilderTests.test_prefers_local_debs
----------------------------------------------------------------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 499, in _run_test_method
    return self._get_test_method()()
  File "hwpack/tests/test_builder.py", line 248, in test_prefers_local_debs
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 345, in assertThat
    % (matchee, matcher, mismatch.describe()))
AssertionError: Match failed. Matchee: "hwpack_ahwpack_1.0_armel.tar.gz"
Matcher: Is a valid hardware pack.
Difference: Differences: [
Differences: [
u'foo=1.0' != 'foo=1.1'
]
: There was 1 mismatch: The content of path "manifest" did not match
"<tarfile.TarFile object at 0x854b0cc>" has no path "pkgs/foo_1.0_all.deb"
Differences: [
Differences: [
'foo_1.0_all.deb' != u'foo_1.1_all.deb': filename
u'1.0' != u'1.1': version
578L != 26: size
'47821d6621149a9aac1fedb4adf7a78b' != u'737e59d917167e7766fd2f17b9a22685': md5
]

]
: There was 1 mismatch: The content of path "pkgs/Packages" did not match
]

------------
======================================================================
FAIL: hwpack.tests.test_packages.PackageFetcherTests.test_fetch_packages_fetches_preferred_label
----------------------------------------------------------------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 499, in _run_test_method
    return self._get_test_method()()
  File "hwpack/tests/test_packages.py", line 991, in test_fetch_packages_fetches_preferred_label
    lower_package, fetcher.fetch_packages(["foo"])[0])
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 268, in assertEqual
    self.assertThat(observed, matcher)
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 345, in assertThat
    % (matchee, matcher, mismatch.describe()))
AssertionError: Match failed. Matchee: "<FetchedPackage name=foo version=2.0 size=26 md5=cb378af052f648546d80b046ac89f4c7 architecture=all depends="None" pre_depends="None" conflicts="None" recommends="None" provides="None" replaces="None" breaks="None" has_content=yes>"
Matcher: Equals(<DummyFetchedPackage name=foo version=1.0 size=26 md5=ba438032c945498b6f186f71f5ba5b3e architecture=all depends="None" pre_depends="None" conflicts="None" recommends="None" provides="None" replaces="None" breaks="None" has_content=yes>)
Difference: !=:
reference = <DummyFetchedPackage name=foo version=1.0 size=26 md5=ba438032c945498b6f186f71f5ba5b3e architecture=all depends="None" pre_depends="None" conflicts="None" recommends="None" provides="None" replaces="None" breaks="None" has_content=yes>
actual = <FetchedPackage name=foo version=2.0 size=26 md5=cb378af052f648546d80b046ac89f4c7 architecture=all depends="None" pre_depends="None" conflicts="None" recommends="None" provides="None" replaces="None" breaks="None" has_content=yes>

------------
Ran 388 tests in 5.180s

Full log:
http://launchpadlibrarian.net/63107950/buildlog_ubuntu-lucid-i386.linaro-image-tools_0.4.2-0ubuntu3~linaro1~dooz2_FAILEDTOBUILD.txt.gz

Bye,

Related branches

On Sat, 29 Jan 2011 20:57:11 -0000, Loïc Minier <email address hidden> wrote:
> Public bug reported:
>
> Hey
>
> I backported various packages to lucid in the ~linaro-maitainers/tools
> PPA and in my own ~lool PPA and managed to get the package mostly
> building, but the testsuite fails as follows:
> ======================================================================
> FAIL: hwpack.tests.test_packages.PackageFetcherTests.test_fetch_packages_fetches_preferred_label
> ----------------------------------------------------------------------
> Text attachment: traceback
> ------------
> Traceback (most recent call last):
> File "/usr/lib/python2.6/dist-packages/testtools/runtest.py", line 169, in _run_user
> return fn(*args, **kwargs)
> File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 499, in _run_test_method
> return self._get_test_method()()
> File "hwpack/tests/test_packages.py", line 991, in test_fetch_packages_fetches_preferred_label
> lower_package, fetcher.fetch_packages(["foo"])[0])
> File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 268, in assertEqual
> self.assertThat(observed, matcher)
> File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 345, in assertThat
> % (matchee, matcher, mismatch.describe()))
> AssertionError: Match failed. Matchee: "<FetchedPackage name=foo version=2.0 size=26 md5=cb378af052f648546d80b046ac89f4c7 architecture=all depends="None" pre_depends="None" conflicts="None" recommends="None" provides="None" replaces="None" breaks="None" has_content=yes>"
> Matcher: Equals(<DummyFetchedPackage name=foo version=1.0 size=26 md5=ba438032c945498b6f186f71f5ba5b3e architecture=all depends="None" pre_depends="None" conflicts="None" recommends="None" provides="None" replaces="None" breaks="None" has_content=yes>)
> Difference: !=:
> reference = <DummyFetchedPackage name=foo version=1.0 size=26 md5=ba438032c945498b6f186f71f5ba5b3e architecture=all depends="None" pre_depends="None" conflicts="None" recommends="None" provides="None" replaces="None" breaks="None" has_content=yes>
> actual = <FetchedPackage name=foo version=2.0 size=26 md5=cb378af052f648546d80b046ac89f4c7 architecture=all depends="None" pre_depends="None" conflicts="None" recommends="None" provides="None" replaces="None" breaks="None" has_content=yes>

The other failure is likely due the same cause as this one.

It looks to me from the failure as though apt in lucid doesn't support
selecting a preferred repo based on label.

It may be a bug in our code, but if it's not then I don't think we can
support this feature on lucid, and so should make it conditional
somehow.

Thanks,

James

Loïc Minier (lool) wrote :

So just upgrading apt, apt-utils and python-apt to the maverick verions fixes the bug; I didn't find anything related to labels in the python-apt and apt changelogs though.

Loïc Minier (lool) wrote :

I tried apt r1958 because it seemed vaguely related:
fixes bug(s): http://bugs.debian.org/512318
committer: Julian Andres Klode <email address hidden>
branch nick: debian-sid
timestamp: Sun 2010-03-21 17:38:43 +0100
message:
  * apt-pkg/policy.cc:
    - Always return a candidate if there is at least one version pinned > 0
      (Closes: #512318)

but it didn't help

Changed in apt (Ubuntu):
status: New → Fix Released
Loïc Minier (lool) wrote :

(I'm keeping the l-i-t task open in case we want to workaround, but moving back to New until we understand what needs to be done.)

Changed in linaro-image-tools:
status: New → Confirmed
importance: Undecided → Medium
status: Confirmed → New
Loïc Minier (lool) wrote :

This fixes the apt issue which breaks the testsuite on lucid; with a patched apt, the testsuite completes without any failure

Changed in linaro-image-tools:
assignee: nobody → Loïc Minier (lool)
status: New → Invalid
Loïc Minier (lool) on 2011-04-19
Changed in apt (Ubuntu):
importance: Undecided → Low
importance: Low → Medium
Changed in apt (Ubuntu Lucid):
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Loïc Minier (lool)
Loïc Minier (lool) wrote :

I pushed a patched apt to ppa:~linaro-maintainers/tools and backported the latest linaro-image-tools package to lucid.

Accepted apt into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in apt (Ubuntu Lucid):
status: Triaged → Fix Committed
tags: added: verification-needed
Loïc Minier (lool) wrote :

Running "testr run" from the tip of linaro-image-tools's bzr branch with apt 0.7.25.3ubuntu7:
running: python -m subunit.run linaro_image_tools.tests.test_suite| testr load
======================================================================
ERROR: linaro_image_tools.tests.test_utils.TestInstallPackageProviding.test_found_package
----------------------------------------------------------------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 499, in _run_test_method
    return self._get_test_method()()
  File "linaro_image_tools/tests/test_utils.py", line 102, in test_found_package
    install_package_providing('mkfs.vfat')
  File "linaro_image_tools/utils.py", line 39, in install_package_providing
    "Cannot lookup a package which provides %s" % command)
UnableToFindPackageProvidingCommand: Cannot lookup a package which provides mkfs.vfat
------------
======================================================================
[...]

with apt 0.7.25.3ubuntu9.5:

running: python -m subunit.run linaro_image_tools.tests.test_suite| testr load
id: 53 tests: 443

=> PASS

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.7.25.3ubuntu9.5

---------------
apt (0.7.25.3ubuntu9.5) lucid-proposed; urgency=low

  [ Michael Vogt ]
  * debian/apt.cron.daily:
    - source /etc/default/locale (if available) so that the
      apt-get update cron job fetches the right translated package
      descriptions (LP: #652951)

  [ Loïc Minier ]
  * Backport r2014.1.2 (see below); fixes bug in APT when running the
    linaro-image-tools testsuite; LP: #709895.

    [ David Kalnischkies ]
    * apt-pkg/acquire-item.cc:
      - use also unsigned Release files again (Closes: #596189)

  [ Colin Watson ]
  * Backport r1327.24.434, 1327.24.437, 1327.76.1 (LP: #787500)
 -- Michael Vogt <email address hidden> Tue, 24 May 2011 18:23:29 +0200

Changed in apt (Ubuntu Lucid):
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

Remote bug watches

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