raring test failure: bzrlib.tests.test_smart.TestSmartServerRepositoryGetParentMap.test_trivial_bzipped

Bug #1090043 reported by Andrew Starr-Bochicchio
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Medium
Unassigned
Python
Fix Released
Unknown
python2.7 (Ubuntu)
Fix Released
High
Unassigned
python3.3 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Trying to build a snapshot of revision 6571 on Ubuntu raring fails with the following test failure:

ERROR: bzrlib.tests.test_smart.TestSmartServerRepositoryGetParentMap.test_trivial_bzipped
----------------------------------------------------------------------
_StringException: log: {{{
1682.947 creating repository in memory+205946636:///.bzr/.
1682.949 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0xc69c46c> in memory+205946636:///
}}}

Traceback (most recent call last):
  File "/build/buildd/bzr-2.6.0~bzr6571/build/lib.linux-i686-2.7/bzrlib/tests/test_smart.py", line 1656, in test_trivial_bzipped
    smart_req.SuccessfulSmartServerResponse(('ok', ), bz2.compress('')),
ValueError: the bz2 library has received wrong parameters

----------------------------------------------------------------------
Ran 28505 tests in 1745.308s

FAILED (errors=1, known_failure_count=59)

https://launchpadlibrarian.net/125714027/buildlog_ubuntu-raring-i386.bzr_2.6.0~bzr6571-1~ppa1_FAILEDTOBUILD.txt.gz

description: updated
Jelmer Vernooij (jelmer)
Changed in bzr:
status: New → Triaged
importance: Undecided → Medium
status: Triaged → Confirmed
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

In a clean raring chroot, this works:

root@andrew-laptop:/# python2.7
Python 2.7.3 (default, Sep 26 2012, 21:53:58)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bz2
>>> bz2.compress('')
'BZh9\x17rE8P\x90\x00\x00\x00\x00'

So I'm not sure why it doesn't work in the test...

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

It doesn't work here in a raring chroot:

root@gwenhwyvar:~# cat /etc/issue
Ubuntu Raring Ringtail (development branch) \n \l

root@gwenhwyvar:~# dpkg -l | grep python\
ii python 2.7.3-10ubuntu3 amd64 interactive high-level object-oriented language (default version)
root@gwenhwyvar:~# python
Python 2.7.3 (default, Dec 12 2012, 19:00:09)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bz2
>>> bz2.compress('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: the bz2 library has received wrong parameters

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

The attached branch fixes this immediate issue for test_trivial_bzipped , but there are still a couple of other places where bzr can pass an empty string to bz2.compress().

Changed in bzr (Ubuntu):
status: New → Triaged
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote : Re: [Bug 1090043] Re: raring test failure: bzrlib.tests.test_smart.TestSmartServerRepositoryGetParentMap.test_trivial_bzipped

Ugg... That chroot wasn't up-to-date. It had python 2.7.3-0ubuntu7.
With 2.7.3-10ubuntu3 it fails.

Sorry for the noise.

Changed in bzr (Ubuntu):
importance: Undecided → High
Revision history for this message
Martin Packman (gz) wrote :

This looks like a regression in the python bz2 module rather than something that needs fixing in Bazaar.

In fact, back in the stone age, there was a bug about one of the methods of compressing an empty string not working, which was fixed:

<http://bugs.python.org/issue853061>

Martin Packman (gz)
affects: bzr (Ubuntu) → python-defaults (Ubuntu)
Changed in python:
status: Unknown → New
Martin Packman (gz)
affects: python-defaults (Ubuntu) → python2.7 (Ubuntu)
Changed in python:
status: New → Fix Released
Changed in bzr:
status: Confirmed → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python2.7 - 2.7.3-14ubuntu1

---------------
python2.7 (2.7.3-14ubuntu1) raring; urgency=low

  * Merge with Debian; remaining changes:
    - Priority of packages is optional, not standard.
    - Regenerate the control file.

python2.7 (2.7.3-14) experimental; urgency=low

  * Update to 20130105, taken from the 2.7 branch.
    - Issue #16367: Fix FileIO.readall() on Windows for files larger than 2 GB.
    - Issue #15516: Fix a bug in PyString_FromFormat where it failed
      to properly ignore errors from a __int__() method.
    - Issue #16839: Fix a segfault when calling unicode() on a classic class
      early in interpreter initialization.
    - Issue #16761: Calling ``int()`` and ``long()`` with *base* argument only
      now raises TypeError.
    - Issue #16828: Fix error incorrectly raised by bz2.compress('').
      LP: #1090043.
    - Issue #16819: IDLE method completion now correctly works for unicode
      literals.
    - Issue 10527: make multiprocessing use poll() instead of select()
      if available.
    - Issue #16485: Now file descriptors are closed if file header patching
      failed on closing an aifc file.
    - Issue #12065: connect_ex() on an SSL socket now returns the original
      errno when the socket's timeout expires (it used to return None).
    - Issue #16504: IDLE now catches SyntaxErrors raised by tokenizer.
    - Issue #16702: test_urllib2_localnet tests now correctly ignores proxies
      for localhost tests.
    - Issue #16713: Fix the parsing of tel url with params using urlparse
      module.
    - Issue #16443: Add docstrings to regular expression match objects.
    - Issue #8853: Allow port to be of type long for socket.getaddrinfo().
    - Issue #16597: In buffered and text IO, call close() on the underlying
      stream if invoking flush() fails.
    - Issue #15701: Fix HTTPError info method call to return the headers
      information.
    - Issue #14958: Change IDLE systax highlighting to recognize all string
      and byte literals currently supported in Python 2.7.
    - Issue #15324: Fix regrtest parsing of --fromfile and --randomize options.
    - Issue #16618: Add more regression tests for glob.
    - Issue #13094: add "Why do lambdas defined in a loop with different values
      all return the same result?" programming FAQ.
  * python-config --help returns with an exit value 0. LP: #1093860.
  * Update package description for the -dbg packages. Closes: #696616.
 -- Matthias Klose <email address hidden> Sun, 06 Jan 2013 12:54:01 +0100

Changed in python2.7 (Ubuntu):
status: Triaged → Fix Released
Matthias Klose (doko)
Changed in python3.3 (Ubuntu):
status: New → Fix Released
Revision history for this message
Matthias Klose (doko) wrote :

hmm, the test still fails with the updated python2.7

Changed in bzr:
status: Invalid → New
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Hmm... They all pass for me in a raring PPA:

https://launchpadlibrarian.net/127765787/buildlog_ubuntu-raring-i386.bzr_2.6.0~bzr6571-2~ppa1_BUILDING.txt.gz

test_smart.TestSmartServerRepositoryGetParentMap.test_trivial_bzipped OK 10ms

Revision history for this message
Matthias Klose (doko) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

however the versions for the bzr builds don't exactly match.

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

The version in my PPA is a work in progress that I'm going to upload to Debian soon, but the same upstream version of bzr is currently sitting in raring-proposed, 2.6.0~bzr6571-1ubuntu1.

Revision history for this message
Matthias Klose (doko) wrote :

given back the package in raring-proposed, builds did succeed

Changed in bzr:
status: New → Invalid
Revision history for this message
Vincent Ladeuil (vila) wrote :

i.e. TDD rocks ;-D

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.