test_mv_change_case_dir fails on OS X 10.4.11

Bug #249988 reported by cfr on 2008-07-18
2
Affects Status Importance Assigned to Milestone
Bazaar
Undecided
Vincent Ladeuil

Bug Description

make check ends with:

blackbox.test_mv.TestMove.test_mv_change_case_dir FAIL 599ms
    Unexpected return code
not equal:
a = 0
b = 3

======================================================================
FAIL: test_mv_change_case_dir (bzrlib.tests.blackbox.test_mv.TestMove)

vvvv[log from bzrlib.tests.blackbox.test_mv.TestMove.test_mv_change_case_dir]-
633.611 created control directory in file:///private/tmp/testbzr-5tNEOk.tmp/tmp8xAwOj/work/
633.642 creating repository in file:///private/tmp/testbzr-5tNEOk.tmp/tmp8xAwOj/work/.bzr/.
633.678 creating branch <bzrlib.branch.BzrBranchFormat6 object at 0x3a2dbf0> in file:///private/tmp/testbzr-5tNEOk.tmp/tmp8xAwOj/work/.bzr/
633.836 trying to create missing lock '/private/tmp/testbzr-5tNEOk.tmp/tmp8xAwOj/work/.bzr/checkout/dirstate'
633.852 opening working tree '/private/tmp/testbzr-5tNEOk.tmp/tmp8xAwOj/work'
633.992 run bzr: ['mv', 'foo', 'Foo']
633.992 bzr arguments: ['mv', 'foo', 'Foo']
633.995 encoding stdout as sys.stdout encoding 'US-ASCII'
634.015 opening working tree '/private/tmp/testbzr-5tNEOk.tmp/tmp8xAwOj/work'
634.053 Traceback (most recent call last):
  File "/Users/cfrees/Documents/src/bzr-1.5/bzrlib/commands.py", line 865, in run_bzr_catch_user_errors
    return run_bzr(argv)
  File "/Users/cfrees/Documents/src/bzr-1.5/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/Users/cfrees/Documents/src/bzr-1.5/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Users/cfrees/Documents/src/bzr-1.5/bzrlib/builtins.py", line 528, in run
    self._run(tree, names_list, rel_names, after)
  File "/Users/cfrees/Documents/src/bzr-1.5/bzrlib/builtins.py", line 559, in _run
    tree.rename_one(rel_names[0], rel_names[1], after=after)
  File "/Users/cfrees/Documents/src/bzr-1.5/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/Users/cfrees/Documents/src/bzr-1.5/bzrlib/workingtree_4.py", line 1234, in rename_one
    WorkingTree.rename_one(self, from_rel, to_rel, after)
  File "/Users/cfrees/Documents/src/bzr-1.5/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/Users/cfrees/Documents/src/bzr-1.5/bzrlib/workingtree.py", line 1401, in rename_one
    rename_entries = self._determine_mv_mode(rename_entries, after)
  File "/Users/cfrees/Documents/src/bzr-1.5/bzrlib/workingtree.py", line 1303, in _determine_mv_mode
    raise errors.RenameFailedFilesExist(from_rel, to_rel)
RenameFailedFilesExist: Could not rename foo => Foo because both files exist. (Use --after to tell bzr about a rename that has already happened)

634.055 errors:
'bzr: ERROR: Could not rename foo => Foo because both files exist. (Use --after to tell bzr about a rename that has already happened)\n'
634.101 opening working tree '/tmp/testbzr-5tNEOk.tmp'

^^^^[log from bzrlib.tests.blackbox.test_mv.TestMove.test_mv_change_case_dir]-
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/cfrees/Documents/src/bzr-1.5/bzrlib/tests/blackbox/test_mv.py", line 145, in test_mv_change_case_dir
    self.run_bzr('mv foo Foo')
AssertionError: Unexpected return code
not equal:
a = 0
b = 3

----------------------------------------------------------------------
Ran 342 tests in 597.724s

FAILED (failures=1, known_failure_count=1)
Missing feature 'Internally performed glob expansion' skipped 2 tests.
tests failed
bzrlib.tests.blackbox.test_branch.TestRemoteBranch.test_branch_local_remote is leaking threads among 8 leaking tests
make: *** [check] Error 1

Note: the standard Mac OS X file system is case insensitive. It is in general not possible to directly mv foo to Foo. One has to move foo to foo.tmp and then move foo.tmp to Foo or use some other work around. I don't know how the test is done but it seems more likely that one file is being recognised twice than that "both files exist".

I'm wondering if this test should at least be flagged as an expected failure on case insensitive file systems.

cfr (margali) wrote :

Actually, I see it is meant to work around this, but apparently isn't...

Vincent Ladeuil (vila) wrote :

I didn't noticed the bug earlier, bugs this has been fixed on bzr.dev

Changed in bzr:
assignee: nobody → vila
milestone: none → 1.7
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers