tests fail if there's a /tmp/.bzr directory

Bug #674373 reported by Andrew Bennetts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

These failures occur 100% of the time for me at the moment:

$ BZR_PLUGIN_PATH=-site:-user ./bzr selftest -s bb.test_outside_wt

bzr selftest: /home/andrew/warthogs/bzr/devel/bzr
   /home/andrew/warthogs/bzr/devel/bzrlib
   bzr-2.3.0dev4 python-2.6.6 Linux-2.6.35-22-generic-i686-with-Ubuntu-10.10-maverick

FAIL: blackbox.test_outside_wt.TestOutsideWT.test_cwd_log_cwd_log
    Text attachment: log
------------
0.281 creating repository in file:///tmp/testbzr-ujUNc4.tmp/.bzr/.
0.285 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x9f4e54c> in file:///tmp/testbzr-ujUNc4.tmp/
0.293 trying to create missing lock '/tmp/testbzr-ujUNc4.tmp/.bzr/checkout/dirstate'
0.294 opening working tree '/tmp/testbzr-ujUNc4.tmp'
0.299 run bzr: ['log']
0.299 bazaar version: 2.3.0dev4
0.299 bzr arguments: ['log']
0.301 encoding stdout as sys.stdout encoding 'UTF-8'
0.307 Traceback (most recent call last):
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 1231, in run_bzr_catch_user_errors
    return run_bzr(argv)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 1123, in run_bzr
    ret = run(*run_argv)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 691, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 710, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 1138, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/builtins.py", line 2393, in run
    b = dir.open_branch()
  File "/home/andrew/warthogs/bzr/devel/bzrlib/bzrdir.py", line 1424, in open_branch
    format = self.find_branch_format(name=name)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/bzrdir.py", line 1312, in find_branch_format
    return BranchFormat.find_format(self, name=name)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/branch.py", line 1570, in find_format
    raise errors.NotBranchError(path=transport.base, bzrdir=a_bzrdir)
NotBranchError: Not a branch: "/tmp/.bzr/branch/": location is a repository.

0.307 errors:
'bzr: ERROR: Not a branch: "/tmp/.bzr/branch/": location is a repository.\n'
0.311 opening working tree '/tmp/testbzr-ujUNc4.tmp'
------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/testtools/runtest.py", line 144, in _run_user
    return fn(*args)
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 465, in _run_test_method
    testMethod()
  File "/home/andrew/warthogs/bzr/devel/bzrlib/tests/blackbox/test_outside_wt.py", line 43, in test_cwd_log
    err)
AssertionError: not equal:
a = u'bzr: ERROR: Not a branch: "/tmp/tmpDw73s1/".\n'
b = 'bzr: ERROR: Not a branch: "/tmp/.bzr/branch/": location is a repository.\n'

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

FAIL: blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree_diff_outside_tree
    Text attachment: log
------------
0.315 creating repository in file:///tmp/testbzr-ujUNc4.tmp/bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree/work/branch1/.bzr/.
0.317 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0xa57806c> in file:///tmp/testbzr-ujUNc4.tmp/bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree/work/branch1/
0.324 trying to create missing lock '/tmp/testbzr-ujUNc4.tmp/bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree/work/branch1/.bzr/checkout/dirstate'
0.325 opening working tree '/tmp/testbzr-ujUNc4.tmp/bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree/work/branch1'
0.332 preparing to commit
    INFO Committing to: /tmp/testbzr-ujUNc4.tmp/bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree/work/branch1/
0.335 Selecting files for commit with filter None
    INFO Committed revision 1.
0.347 Committed revid <email address hidden> as revno 1.
0.351 preparing to commit
    INFO Committing to: /tmp/testbzr-ujUNc4.tmp/bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree/work/branch1/
0.353 Selecting files for commit with filter None
    INFO Committed revision 2.
0.360 Committed revid <email address hidden> as revno 2.
0.361 run bzr: ['diff', '-r', 'revno:2:branch2..revno:1']
0.361 bazaar version: 2.3.0dev4
0.361 bzr arguments: ['diff', '-r', 'revno:2:branch2..revno:1']
0.371 Returning RevisionSpec RevisionSpec_revno for revno:2:branch2
0.371 Returning RevisionSpec RevisionSpec_revno for revno:1
0.372 encoding stdout as sys.stdout encoding 'UTF-8'
0.375 Traceback (most recent call last):
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 1231, in run_bzr_catch_user_errors
    return run_bzr(argv)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 1123, in run_bzr
    ret = run(*run_argv)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 691, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 710, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 1138, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/builtins.py", line 2004, in run
    file_list, revision, old, new, self.add_cleanup, apply_view=True)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/diff.py", line 397, in get_trees_and_branches_to_diff_locked
    bzrdir.BzrDir.open_containing_tree_or_branch(old_url)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/bzrdir.py", line 820, in open_containing_tree_or_branch
    tree, branch = bzrdir._get_tree_branch()
  File "/home/andrew/warthogs/bzr/devel/bzrlib/controldir.py", line 537, in _get_tree_branch
    branch = self.open_branch(name=name)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/bzrdir.py", line 1424, in open_branch
    format = self.find_branch_format(name=name)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/bzrdir.py", line 1312, in find_branch_format
    return BranchFormat.find_format(self, name=name)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/branch.py", line 1570, in find_format
    raise errors.NotBranchError(path=transport.base, bzrdir=a_bzrdir)
NotBranchError: Not a branch: "/tmp/.bzr/branch/": location is a repository.

0.375 errors:
'bzr: ERROR: Not a branch: "/tmp/.bzr/branch/": location is a repository.\n'
0.378 opening working tree '/tmp/testbzr-ujUNc4.tmp'
------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/testtools/runtest.py", line 144, in _run_user
    return fn(*args)
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 465, in _run_test_method
    testMethod()
  File "/home/andrew/warthogs/bzr/devel/bzrlib/tests/blackbox/test_outside_wt.py", line 68, in test_diff_outside_tree
    self.assertEqual(expected_error, err)
AssertionError: not equal:
a = u'bzr: ERROR: Not a branch: "/tmp/tmpNsYyOG/branch2/".\n'
b = 'bzr: ERROR: Not a branch: "/tmp/.bzr/branch/": location is a repository.\n'

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

======================================================================
FAIL: bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_cwd_log
----------------------------------------------------------------------
_StringException: Text attachment: log
------------
0.281 creating repository in file:///tmp/testbzr-ujUNc4.tmp/.bzr/.
0.285 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x9f4e54c> in file:///tmp/testbzr-ujUNc4.tmp/
0.293 trying to create missing lock '/tmp/testbzr-ujUNc4.tmp/.bzr/checkout/dirstate'
0.294 opening working tree '/tmp/testbzr-ujUNc4.tmp'
0.299 run bzr: ['log']
0.299 bazaar version: 2.3.0dev4
0.299 bzr arguments: ['log']
0.301 encoding stdout as sys.stdout encoding 'UTF-8'
0.307 Traceback (most recent call last):
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 1231, in run_bzr_catch_user_errors
    return run_bzr(argv)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 1123, in run_bzr
    ret = run(*run_argv)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 691, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 710, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 1138, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/builtins.py", line 2393, in run
    b = dir.open_branch()
  File "/home/andrew/warthogs/bzr/devel/bzrlib/bzrdir.py", line 1424, in open_branch
    format = self.find_branch_format(name=name)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/bzrdir.py", line 1312, in find_branch_format
    return BranchFormat.find_format(self, name=name)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/branch.py", line 1570, in find_format
    raise errors.NotBranchError(path=transport.base, bzrdir=a_bzrdir)
NotBranchError: Not a branch: "/tmp/.bzr/branch/": location is a repository.

0.307 errors:
'bzr: ERROR: Not a branch: "/tmp/.bzr/branch/": location is a repository.\n'
0.311 opening working tree '/tmp/testbzr-ujUNc4.tmp'
------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/testtools/runtest.py", line 144, in _run_user
    return fn(*args)
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 465, in _run_test_method
    testMethod()
  File "/home/andrew/warthogs/bzr/devel/bzrlib/tests/blackbox/test_outside_wt.py", line 43, in test_cwd_log
    err)
AssertionError: not equal:
a = u'bzr: ERROR: Not a branch: "/tmp/tmpDw73s1/".\n'
b = 'bzr: ERROR: Not a branch: "/tmp/.bzr/branch/": location is a repository.\n'

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

======================================================================
FAIL: bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree
----------------------------------------------------------------------
_StringException: Text attachment: log
------------
0.315 creating repository in file:///tmp/testbzr-ujUNc4.tmp/bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree/work/branch1/.bzr/.
0.317 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0xa57806c> in file:///tmp/testbzr-ujUNc4.tmp/bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree/work/branch1/
0.324 trying to create missing lock '/tmp/testbzr-ujUNc4.tmp/bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree/work/branch1/.bzr/checkout/dirstate'
0.325 opening working tree '/tmp/testbzr-ujUNc4.tmp/bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree/work/branch1'
0.332 preparing to commit
    INFO Committing to: /tmp/testbzr-ujUNc4.tmp/bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree/work/branch1/
0.335 Selecting files for commit with filter None
    INFO Committed revision 1.
0.347 Committed revid <email address hidden> as revno 1.
0.351 preparing to commit
    INFO Committing to: /tmp/testbzr-ujUNc4.tmp/bzrlib.tests.blackbox.test_outside_wt.TestOutsideWT.test_diff_outside_tree/work/branch1/
0.353 Selecting files for commit with filter None
    INFO Committed revision 2.
0.360 Committed revid <email address hidden> as revno 2.
0.361 run bzr: ['diff', '-r', 'revno:2:branch2..revno:1']
0.361 bazaar version: 2.3.0dev4
0.361 bzr arguments: ['diff', '-r', 'revno:2:branch2..revno:1']
0.371 Returning RevisionSpec RevisionSpec_revno for revno:2:branch2
0.371 Returning RevisionSpec RevisionSpec_revno for revno:1
0.372 encoding stdout as sys.stdout encoding 'UTF-8'
0.375 Traceback (most recent call last):
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 1231, in run_bzr_catch_user_errors
    return run_bzr(argv)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 1123, in run_bzr
    ret = run(*run_argv)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 691, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 710, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/commands.py", line 1138, in ignore_pipe
    result = func(*args, **kwargs)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/builtins.py", line 2004, in run
    file_list, revision, old, new, self.add_cleanup, apply_view=True)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/diff.py", line 397, in get_trees_and_branches_to_diff_locked
    bzrdir.BzrDir.open_containing_tree_or_branch(old_url)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/bzrdir.py", line 820, in open_containing_tree_or_branch
    tree, branch = bzrdir._get_tree_branch()
  File "/home/andrew/warthogs/bzr/devel/bzrlib/controldir.py", line 537, in _get_tree_branch
    branch = self.open_branch(name=name)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/bzrdir.py", line 1424, in open_branch
    format = self.find_branch_format(name=name)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/bzrdir.py", line 1312, in find_branch_format
    return BranchFormat.find_format(self, name=name)
  File "/home/andrew/warthogs/bzr/devel/bzrlib/branch.py", line 1570, in find_format
    raise errors.NotBranchError(path=transport.base, bzrdir=a_bzrdir)
NotBranchError: Not a branch: "/tmp/.bzr/branch/": location is a repository.

0.375 errors:
'bzr: ERROR: Not a branch: "/tmp/.bzr/branch/": location is a repository.\n'
0.378 opening working tree '/tmp/testbzr-ujUNc4.tmp'
------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/testtools/runtest.py", line 144, in _run_user
    return fn(*args)
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 465, in _run_test_method
    testMethod()
  File "/home/andrew/warthogs/bzr/devel/bzrlib/tests/blackbox/test_outside_wt.py", line 68, in test_diff_outside_tree
    self.assertEqual(expected_error, err)
AssertionError: not equal:
a = u'bzr: ERROR: Not a branch: "/tmp/tmpNsYyOG/branch2/".\n'
b = 'bzr: ERROR: Not a branch: "/tmp/.bzr/branch/": location is a repository.\n'

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

----------------------------------------------------------------------
Ran 3 tests in 0.208s

FAILED (failures=2)

$ bzr revision-info
5538 <email address hidden>

Revision history for this message
Andrew Bennetts (spiv) wrote :

vila wins the diagnosis prize: I had a shared repo in /tmp.

Our tests should still pass in that environment, of course.

Changed in bzr:
importance: Critical → Medium
Martin Pool (mbp)
summary: - test_outside_wt failures on trunk
+ tests fail if there's a /tmp/.bzr directory
tags: added: selftest
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.