- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
Issue29181
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.
Created on 2017-01-06 16:31 by xdegaye, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| test_tarfile.patch | xdegaye, 2017-01-07 20:41 | review | ||
| issue29181_01.patch | xdegaye, 2017-01-09 19:39 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 4375 | merged | xdegaye, 2017-11-11 19:36 | |
| Messages (6) | |||
|---|---|---|---|
| msg284832 - (view) | Author: Xavier de Gaye (xdegaye) * ![]() |
Date: 2017-01-06 16:31 | |
====================================================================== [339/2616] ERROR: test_link_size (test.test_tarfile.Bz2WriteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_tarfile.py", line 1102, in test_link_siz e os.link(target, link) PermissionError: [Errno 13] Permission denied: '/data/local/tmp/test_python_2295/@test_2295_tmp-tard ir/link_target' -> '/data/local/tmp/test_python_2295/@test_2295_tmp-tardir/link' ====================================================================== ERROR: test_link_size (test.test_tarfile.GzipWriteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_tarfile.py", line 1102, in test_link_siz e os.link(target, link) PermissionError: [Errno 13] Permission denied: '/data/local/tmp/test_python_2295/@test_2295_tmp-tard ir/link_target' -> '/data/local/tmp/test_python_2295/@test_2295_tmp-tardir/link' ====================================================================== ERROR: test_add_hardlink (test.test_tarfile.HardlinkTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_tarfile.py", line 1563, in setUp os.link(self.foo, self.bar) PermissionError: [Errno 13] Permission denied: '/data/local/tmp/test_python_2295/@test_2295_tmp-tard ir/foo' -> '/data/local/tmp/test_python_2295/@test_2295_tmp-tardir/bar' ====================================================================== ERROR: test_add_twice (test.test_tarfile.HardlinkTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_tarfile.py", line 1563, in setUp os.link(self.foo, self.bar) PermissionError: [Errno 13] Permission denied: '/data/local/tmp/test_python_2295/@test_2295_tmp-tard ir/foo' -> '/data/local/tmp/test_python_2295/@test_2295_tmp-tardir/bar' ====================================================================== ERROR: test_dereference_hardlink (test.test_tarfile.HardlinkTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_tarfile.py", line 1563, in setUp os.link(self.foo, self.bar) PermissionError: [Errno 13] Permission denied: '/data/local/tmp/test_python_2295/@test_2295_tmp-tard ir/foo' -> '/data/local/tmp/test_python_2295/@test_2295_tmp-tardir/bar' ====================================================================== ERROR: test_link_size (test.test_tarfile.WriteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_tarfile.py", line 1102, in test_link_siz e os.link(target, link) PermissionError: [Errno 13] Permission denied: '/data/local/tmp/test_python_2295/@test_2295_tmp-tard ir/link_target' -> '/data/local/tmp/test_python_2295/@test_2295_tmp-tardir/link' ---------------------------------------------------------------------- Ran 426 tests in 17.296s FAILED (errors=6, skipped=80) test test_tarfile failed |
|||
| msg284931 - (view) | Author: Xavier de Gaye (xdegaye) * ![]() |
Date: 2017-01-07 20:41 | |
Patch attached. |
|||
| msg284935 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2017-01-07 21:04 | |
Why os.link() is failed? If hard links are not supported on Android, shouldn't os.link be not implemented? tarfile try to make a copy of the referenced file instead of a link if a link can't be created. |
|||
| msg284938 - (view) | Author: Xavier de Gaye (xdegaye) * ![]() |
Date: 2017-01-07 21:41 | |
> Why os.link() is failed? If hard links are not supported on Android, shouldn't os.link be not implemented? Android has a restrictive security model based on SELinux [1]. With the Android adb shell on the emulator at API level 24: $ >foo $ ln foo bar ln: cannot create hard link from 'foo' to 'bar': Permission denied $ su # ln foo bar # ls -li foo bar 15688 -rw-rw-rw- 2 shell shell 0 2017-01-07 22:29 bar 15688 -rw-rw-rw- 2 shell shell 0 2017-01-07 22:29 foo Here is the Android commit message that does not grant hard link capabilities by default: https://android.googlesource.com/platform/external/sepolicy/+/85ce2c7 [1] https://source.android.com/security/selinux/ |
|||
| msg285066 - (view) | Author: Xavier de Gaye (xdegaye) * ![]() |
Date: 2017-01-09 19:39 | |
New patch following Serhiy's suggestion in msg285008. |
|||
| msg306124 - (view) | Author: Xavier de Gaye (xdegaye) * ![]() |
Date: 2017-11-12 17:02 | |
New changeset d7d4fea4a39da4bfdea1de22fe040023eb4ddc17 by xdegaye in branch 'master': bpo-29181: Skip test_tarfile tests on PermissionError raised by Android (GH-4375) https://github.com/python/cpython/commit/d7d4fea4a39da4bfdea1de22fe040023eb4ddc17 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:41 | admin | set | github: 73367 |
| 2017-11-12 17:03:40 | xdegaye | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2017-11-12 17:02:08 | xdegaye | set | messages: + msg306124 |
| 2017-11-11 19:36:32 | xdegaye | set | pull_requests: + pull_request4324 |
| 2017-11-11 18:43:45 | xdegaye | set | versions: - Python 3.6 |
| 2017-02-03 18:44:25 | xdegaye | set | assignee: xdegaye -> |
| 2017-01-09 19:39:50 | xdegaye | set | files:
+ issue29181_01.patch messages: + msg285066 |
| 2017-01-07 21:41:22 | xdegaye | set | messages: + msg284938 |
| 2017-01-07 21:04:25 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg284935 |
| 2017-01-07 20:41:08 | xdegaye | set | files:
+ test_tarfile.patch keywords: + patch messages: + msg284931 stage: needs patch -> patch review |
| 2017-01-06 21:30:19 | xdegaye | link | issue26865 dependencies |
| 2017-01-06 21:22:55 | xdegaye | set | nosy:
+ lars.gustaebel |
| 2017-01-06 16:31:35 | xdegaye | create | |



