Opened 16 years ago

Closed 16 years ago

#3357 closed bug (invalid)

Dont copy file onto link of itself gives incorrect error?

Reported by: scottmc Owned by: axeld
Priority: normal Milestone: R1
Component: - General Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I'm not sure how to verify this is a valid failure or not, but it's failing in python's regression test test_shutil.h:

~/develop/python/Lib/test> python test_shutil.py
test_copytree_simple (__main__.TestShutil) ... ok
test_copytree_with_exclude (__main__.TestShutil) ... ok
test_dont_copy_file_onto_link_to_itself (__main__.TestShutil) ... ERROR
test_rmtree_dont_delete_file (__main__.TestShutil) ... ok
test_rmtree_errors (__main__.TestShutil) ... ok
test_rmtree_on_symlink (__main__.TestShutil) ... ok
test_dont_move_dir_in_itself (__main__.TestMove) ... ok
test_existing_file_inside_dest_dir (__main__.TestMove) ... ok
test_move_dir (__main__.TestMove) ... ok
test_move_dir_other_fs (__main__.TestMove) ... ok
test_move_dir_to_dir (__main__.TestMove) ... ok
test_move_dir_to_dir_other_fs (__main__.TestMove) ... ok
test_move_file (__main__.TestMove) ... ok
test_move_file_other_fs (__main__.TestMove) ... ok
test_move_file_to_dir (__main__.TestMove) ... ok
test_move_file_to_dir_other_fs (__main__.TestMove) ... ok

======================================================================
ERROR: test_dont_copy_file_onto_link_to_itself (__main__.TestShutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_shutil.py", line 199, in test_dont_copy_file_onto_link_to_itself
    os.link(src, dst)
OSError: [Errno -2147454933] Operation not supported

----------------------------------------------------------------------
Ran 16 tests in 0.813s

FAILED (errors=1)
Traceback (most recent call last):
  File "test_shutil.py", line 349, in <module>
    test_main()
  File "test_shutil.py", line 346, in test_main
    test_support.run_unittest(TestShutil, TestMove)
  File "/boot/common/lib/python2.7/test/test_support.py", line 722, in run_unittest
    _run_suite(suite)
  File "/boot/common/lib/python2.7/test/test_support.py", line 705, in _run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "test_shutil.py", line 199, in test_dont_copy_file_onto_link_to_itself
    os.link(src, dst)
OSError: [Errno -2147454933] Operation not supported

~/develop/python/Lib/test> 

You'll notice that there's only one error in this test now as the other error was indeed fixed with the fixing of #3355

Change History (3)

comment:1 by korli, 16 years ago

This one tries to create a hardlink which fails because it's not supported. I guess it's acceptable then.

comment:2 by scottmc, 16 years ago

ok, then this one can be closed, we'll ignore any failures that involve hardlinks.

comment:3 by korli, 16 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.