This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: test_copyxattr_symlinks fails
Type: Stage:
Components: Tests Versions: Python 3.6, Python 3.5
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, marktay, nitishch, thehesiod
Priority: normal Keywords:

Created on 2017-01-18 23:33 by marktay, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg285764 - (view) Author: mark (marktay) Date: 2017-01-18 23:33
ERROR: test_copyxattr_symlinks (test.test_shutil.TestShutil)
Traceback (most recent call last):
  File "/opt/Python-3.6.0/Lib/test/", line 505, in test_copyxattr_symlinks
    os.setxattr(src, '', b'42')
PermissionError: [Errno 1] Operation not permitted: '/tmp/tmpvlu10qdm/foo'


The problem is that "trusted" attributes (in this case are visible and accessible only to processes that have the CAP_SYS_ADMIN capability. The current "skipUnless" guard is wrong: being root (UID 0) doesn't necessarely imply you have CAP_SYS_ADMIN. For instance this test (and thus "make test") will always fail in a Docker container unless it's started with "--cap-add SYS_ADMIN" (which, in general, is not the best thing to do).
Date User Action Args
2022-04-11 14:58:42adminsetgithub: 73503
2021-12-05 23:25:12iritkatrielsetnosy: + christian.heimes
2018-02-03 07:05:44nitishchsetnosy: + nitishch
2018-02-02 06:22:41thehesiodsetnosy: + thehesiod

versions: + Python 3.5
2017-01-18 23:33:31marktaycreate