ldd tests fail on lucid

Bug #901439 reported by James Westby
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pkgme-devportal
Fix Released
High
Jonathan Lange

Bug Description

Tests running...
======================================================================
FAIL: tests.test_binary.GetSharedLibraryDependenciesTests.test_ldd
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tarmac/pkgme-binary/devportalbinary/tests/test_binary.py", line 309, in test_ldd
    deps)
  File "/home/tarmac/pkgme-binary/virtualenv/lib/python2.6/site-packages/testtools-0.9.12-py2.6.egg/testtools/testcase.py", line 316, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/tarmac/pkgme-binary/virtualenv/lib/python2.6/site-packages/testtools-0.9.12-py2.6.egg/testtools/testcase.py", line 411, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: !=:
reference = {'/home/tarmac/pkgme-binary/devportalbinary/tests/hello': [(None,
                                                            '/lib64/ld-linux-x86-64.so.2'),
                                                           ('libc.so.6',
                                                            '/lib/x86_64-linux-gnu/libc.so.6'),
                                                           ('linux-vdso.so.1',
                                                            None)]}
actual = {'/home/tarmac/pkgme-binary/devportalbinary/tests/hello': [(None,
                                                            '/lib64/ld-linux-x86-64.so.2'),
                                                           ('libc.so.6',
                                                            '/lib/libc.so.6'),
                                                           ('linux-vdso.so.1',
                                                            None)]}
======================================================================
FAIL: tests.test_binary.GetSharedLibraryDependenciesTests.test_ldd_multiple
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tarmac/pkgme-binary/devportalbinary/tests/test_binary.py", line 333, in test_ldd_multiple
    deps)
  File "/home/tarmac/pkgme-binary/virtualenv/lib/python2.6/site-packages/testtools-0.9.12-py2.6.egg/testtools/testcase.py", line 316, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/tarmac/pkgme-binary/virtualenv/lib/python2.6/site-packages/testtools-0.9.12-py2.6.egg/testtools/testcase.py", line 411, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: !=:
reference = {'/home/tarmac/pkgme-binary/devportalbinary/tests/hello': [(None,
                                                            '/lib64/ld-linux-x86-64.so.2'),
                                                           ('libc.so.6',
                                                            '/lib/x86_64-linux-gnu/libc.so.6'),
                                                           ('linux-vdso.so.1',
                                                            None)],
 '/home/tarmac/pkgme-binary/devportalbinary/tests/simple.so.1': [(None,
                                                                  '/lib64/ld-linux-x86-64.so.2'),
                                                                 ('libc.so.6',
                                                                  '/lib/x86_64-linux-gnu/libc.so.6'),
                                                                 ('linux-vdso.so.1',
                                                                  None)]}
actual = {'/home/tarmac/pkgme-binary/devportalbinary/tests/hello': [(None,
                                                            '/lib64/ld-linux-x86-64.so.2'),
                                                           ('libc.so.6',
                                                            '/lib/libc.so.6'),
                                                           ('linux-vdso.so.1',
                                                            None)],
 '/home/tarmac/pkgme-binary/devportalbinary/tests/simple.so.1': [(None,
                                                                  '/lib64/ld-linux-x86-64.so.2'),
                                                                 ('libc.so.6',
                                                                  '/lib/libc.so.6'),
                                                                 ('linux-vdso.so.1',
                                                                  None)]}
======================================================================
FAIL: tests.test_binary.GetSharedLibraryDependenciesTests.test_ldd_not_found
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tarmac/pkgme-binary/devportalbinary/tests/test_binary.py", line 320, in test_ldd_not_found
    deps)
  File "/home/tarmac/pkgme-binary/virtualenv/lib/python2.6/site-packages/testtools-0.9.12-py2.6.egg/testtools/testcase.py", line 316, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/tarmac/pkgme-binary/virtualenv/lib/python2.6/site-packages/testtools-0.9.12-py2.6.egg/testtools/testcase.py", line 411, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: !=:
reference = {'/home/tarmac/pkgme-binary/devportalbinary/tests/hello-missing-deps': [(None,
                                                                         '/lib64/ld-linux-x86-64.so.2'),
                                                                        ('libc.so.6',
                                                                         '/lib/x86_64-linux-gnu/libc.so.6'),
                                                                        ('libnowaythisexists.so.1',
                                                                         None),
                                                                        ('linux-vdso.so.1',
                                                                         None)]}
actual = {'/home/tarmac/pkgme-binary/devportalbinary/tests/hello-missing-deps': [(None,
                                                                         '/lib64/ld-linux-x86-64.so.2'),
                                                                        ('libc.so.6',
                                                                         '/lib/libc.so.6'),
                                                                        ('libnowaythisexists.so.1',
                                                                         None),
                                                                        ('linux-vdso.so.1',
                                                                         None)]}

Ran 55 tests in 2.488s
FAILED (failures=3)

I think this is a multiarch change, so lucid has different paths for some libraries.

I don't know what the right fix is, but does this point to a problem we will have if our
production deployment is on lucid?

Thanks,

James

Related branches

James Westby (james-w)
Changed in pkgme-binary:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Jonathan Lange (jml) wrote :

Not a problem for two reasons:
  1. We discard the full path to the library anyway – it's not needed to figure out dependencies.
  2. We don't actually use the ldd code at all. We use objdump instead.

All in all, the simplest solution is to just excise the ldd code from the tree.

Jonathan Lange (jml)
Changed in pkgme-binary:
status: Triaged → In Progress
assignee: nobody → Jonathan Lange (jml)
James Westby (james-w)
Changed in pkgme-binary:
status: In Progress → Fix Committed
Jonathan Lange (jml)
Changed in pkgme-binary:
status: Fix Committed → 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.