new zlib versions break btree index tests

Bug #940453 reported by Jelmer Vernooij on 2012-02-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
High
Martin Packman
2.4
High
Martin Packman
2.5
High
Martin Packman

Bug Description

Between zlib 1.2.3 and 1.2.6 some improvements were introduced which make zlib slightly more efficient.

This breaks some of the tests in bzrlib.tests.test_btree_index, which rely on specific zlib output.

FAIL: bzrlib.tests.test_btree_index.TestBTreeBuilder.test_last_page_not_rounded_2_layer
----------------------------------------------------------------------
_StringException: Text attachment: log
------------

------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 540, in _run_test_method
    return self._get_test_method()()
  File "/tmp/buildd/bzr-2.5.0/build/lib.linux-x86_64-2.7/bzrlib/tests/test_btree_index.py", line 258, in test_last_page_not_rounded_2_layer
    self.assertEqual(9283, len(content))
AssertionError: not equal:
a = 9283
b = 9281

------------

======================================================================
FAIL: bzrlib.tests.test_btree_index.TestBTreeIndex.test_iter_all_entries_reads
----------------------------------------------------------------------
_StringException: Text attachment: log
------------

------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 540, in _run_test_method
    return self._get_test_method()()
  File "/tmp/buildd/bzr-2.5.0/build/lib.linux-x86_64-2.7/bzrlib/tests/test_btree_index.py", line 863, in test_iter_all_entries_reads
    self.assertEqual(1303220, size, 'number of expected bytes in the'
AssertionError: number of expected bytes in the output changed
not equal:
a = 1303220
b = 1303219

------------

======================================================================
FAIL: bzrlib.tests.test_btree_index.TestBTreeBuilder.test_2_leaves_1_0
----------------------------------------------------------------------
_StringException: Text attachment: log
------------

------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 540, in _run_test_method
    return self._get_test_method()()
  File "/tmp/buildd/bzr-2.5.0/build/lib.linux-x86_64-2.7/bzrlib/tests/test_btree_index.py", line 202, in test_2_leaves_1_0
    self.assertEqual(9283, len(content))
AssertionError: not equal:
a = 9283
b = 9281

------------

======================================================================
FAIL: bzrlib.tests.test_btree_index.TestBTreeIndex.test_2_levels_key_count_2_2
----------------------------------------------------------------------
_StringException: Text attachment: log
------------

------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 540, in _run_test_method
    return self._get_test_method()()
  File "/tmp/buildd/bzr-2.5.0/build/lib.linux-x86_64-2.7/bzrlib/tests/test_btree_index.py", line 753, in test_2_levels_key_count_2_2
    self.assertEqual(17692, size)
AssertionError: not equal:
a = 17692
b = 17687

------------

======================================================================
FAIL: bzrlib.tests.test_btree_index.TestBTreeIndex.test_non_empty_key_count_2_2
----------------------------------------------------------------------
_StringException: Text attachment: log
------------

------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 540, in _run_test_method
    return self._get_test_method()()
  File "/tmp/buildd/bzr-2.5.0/build/lib.linux-x86_64-2.7/bzrlib/tests/test_btree_index.py", line 703, in test_non_empty_key_count_2_2
    self.assertEqual(1173, size)
AssertionError: not equal:
a = 1173
b = 1169

------------

======================================================================
FAIL: bzrlib.tests.test_btree_index.TestBTreeIndex.test_validate_two_pages
----------------------------------------------------------------------
_StringException: Text attachment: log
------------

------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 540, in _run_test_method
    return self._get_test_method()()
  File "/tmp/buildd/bzr-2.5.0/build/lib.linux-x86_64-2.7/bzrlib/tests/test_btree_index.py", line 786, in test_validate_two_pages
    self.assertEqual(9339, size)
AssertionError: not equal:
a = 9339
b = 9336

------------

======================================================================
FAIL: bzrlib.tests.test_btree_index.TestBTreeIndex.test_validate_one_page
----------------------------------------------------------------------
_StringException: Text attachment: log
------------

------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 540, in _run_test_method
    return self._get_test_method()()
  File "/tmp/buildd/bzr-2.5.0/build/lib.linux-x86_64-2.7/bzrlib/tests/test_btree_index.py", line 776, in test_validate_one_page
    self.assertEqual(1488, size)
AssertionError: not equal:
a = 1488
b = 1487

------------

------------------------------------------------------------------

Related branches

Jelmer Vernooij (jelmer) wrote :

This currently affects debian sid but not ubuntu precise (the first has zlib 1.2.6, the latter has 1.2.3)

Jelmer Vernooij (jelmer) wrote :

Oh, and kudos to mgz for figuring this one out :-)

Martin Packman (gz) on 2012-02-26
Changed in bzr:
milestone: none → 2.6b1
assignee: nobody → Martin Packman (gz)
Martin Packman (gz) on 2012-02-27
Changed in bzr:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers