LANG=C support regression

Bug #632387 reported by Vincent Ladeuil on 2010-09-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Andrew Bennetts
Andrew Bennetts

Bug Description

During the 2.1 cycle, we stopped running:
 LC_CTYPE= LANG=C LC_ALL= ./bzr selftest -1v $(tests) 2>&1 | sed -e 's/^/[ascii] /'
on pqm.

If nothing else, it demonstrates once again that *not* running tests or running less tests invariably lead to bugs.

Note that selftest doesn't even finish (I'll put the backtrace for an attempted full run in the next comment).

Since there will probably be several bugs involved, I'll mark this one as master and High.

Related branches

Vincent Ladeuil (vila) wrote :
Download full text (22.1 KiB)

BZR_PLUGIN_PATH=-site LC_CTYPE= LANG=C LC_ALL= ./bzr selftest
bzr selftest: /home/vila/src/bzr/trunk/bzr
   bzr-2.3.0dev1 python-2.6.5 Linux-2.6.32-24-generic-x86_64-with-Ubuntu-10.04-lucid

ERROR: blackbox.test_alias.TestAlias.test_unicode_alias
    Text attachment: log
2.643 creating repository in file:///tmp/testbzr-EYEpgw.tmp/bzrlib.tests.blackbox.test_alias.TestAlias.test_unicode_alias/work/.bzr/.
2.645 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x85d16d0> in file:///tmp/testbzr-EYEpgw.tmp/bzrlib.tests.blackbox.test_alias.TestAlias.test_unicode_alias/work/
2.650 trying to create missing lock '/tmp/testbzr-EYEpgw.tmp/bzrlib.tests.blackbox.test_alias.TestAlias.test_unicode_alias/work/.bzr/checkout/dirstate'
2.650 opening working tree '/tmp/testbzr-EYEpgw.tmp/bzrlib.tests.blackbox.test_alias.TestAlias.test_unicode_alias/work'
2.656 opening working tree '/tmp/testbzr-EYEpgw.tmp'
Text attachment: traceback
Traceback (most recent call last):
  File "/home/vila/lib/python/testtools/", line 144, in _run_user
    return fn(*args)
  File "/home/vila/lib/python/testtools/", line 465, in _run_test_method
  File "/home/vila/src/bzr/trunk/bzrlib/tests/blackbox/", line 52, in test_unicode_alias
  File "/home/vila/src/bzr/trunk/bzrlib/tests/", line 2554, in build_tree
    transport.put_bytes_non_atomic(urlutils.escape(name), content)
  File "/home/vila/src/bzr/trunk/bzrlib/transport/", line 296, in put_bytes_non_atomic
  File "/home/vila/src/bzr/trunk/bzrlib/transport/", line 238, in _put_non_atomic_helper
    fd =, _put_non_atomic_flags, local_mode)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb6' in position 94: ordinal not in range(128)

ERROR: blackbox.test_commit.TestCommit.test_unicode_commit_message_is_filename
    Text attachment: log
20.487 run bzr: ['init']
20.487 bazaar version: 2.3.0dev1
20.487 bzr arguments: ['init']
20.490 encoding stdout as sys.stdout encoding 'ANSI_X3.4-1968'
20.493 creating repository in file:///tmp/testbzr-EYEpgw.tmp/bzrlib.tests.blackbox.test_commit.TestCommit.test_unicode_commit_message_is_filename/work/.bzr/.
20.495 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x8179490> in file:///tmp/testbzr-EYEpgw.tmp/bzrlib.tests.blackbox.test_commit.TestCommit.test_unicode_commit_message_is_filename/work/
20.500 trying to create missing lock '/tmp/testbzr-EYEpgw.tmp/bzrlib.tests.blackbox.test_commit.TestCommit.test_unicode_commit_message_is_filename/work/.bzr/checkout/dirstate'
20.500 opening working tree '/tmp/testbzr-EYEpgw.tmp/bzrlib.tests.blackbox.test_commit.TestCommit.test_unicode_commit_message_is_filename/work'
20.505 opening working tree '/tmp/testbzr-EYEpgw.tmp/bzrlib.tests.blackbox.test_commit.TestCommit.test_unicode_commit_message_is_filename/work'
20.506 output:
'Created a standalone tree (format: 2a)\n'
20.509 opening working tree '/tmp/testbzr-EYEpgw.tmp'
Text attachment: traceback

Martin Packman (gz) wrote :

I'll take the selftest not finishing part in bug 633216, most of the failures look related to the return value of sys.getfilesystemencoding() as ascii.

Andrew Bennetts (spiv) wrote :

I've got a branch that fixes the failures that occur on the 2.2 branch.

Changed in bzr:
assignee: nobody → Andrew Bennetts (spiv)
status: Confirmed → In Progress
Andrew Bennetts (spiv) wrote :

lp:bzr/2.2 passes under LANG=C for me now, and it appears that merging that into lp:bzr makes it pass too, so I'll land that now.

Andrew Bennetts (spiv) wrote :

This appears to be fixed for me, but with this sort of thing it's possible that there's some platform-specific issue I don't see...

Changed in bzr:
milestone: none → 2.3b2
status: In Progress → Fix Released

On 23 September 2010 22:08, Andrew Bennetts
<email address hidden> wrote:
> This appears to be fixed for me, but with this sort of thing it's
> possible that there's some platform-specific issue I don't see...

I wonder if we can get babune to run this variation on some platforms?

Vincent Ladeuil (vila) wrote :

For the record: I've setup such a job on babune to run on all platforms but not on a regular basis so far due to too much random, spurious and mostly unrelated failures.

The summary is: we are good on freebsd and gentoo, almost good on Ubuntu, not good on OSX and windows.

But since the later already need to be addressed separately there is no need to run this job regularly yet.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers