Title: bpo-31940: Reject faulty lchown implementations by asottile · Pull Request #4267 · python/cpython · GitHub
Open Graph Title: bpo-31940: Reject faulty lchown implementations by asottile · Pull Request #4267 · python/cpython
X Title: bpo-31940: Reject faulty lchown implementations by asottile · Pull Request #4267 · python/cpython
Description: Verified by compiling with alpine using the following Dockerfile and test script: FROM alpine RUN apk update && \ apk add expat-dev libressl-dev zlib-dev ncurses-dev bzip2-dev xz-dev \ sqlite-dev libffi-dev tcl-dev linux-headers gdbm-dev readline-dev \ gcc nano bash git python3 alpine-sdk #!/usr/bin/env bash set -euxo pipefail docker build -t python-build . docker run \ --rm -ti \ -v "$PWD/cpython:/src:ro" \ python-build bash -exc '\ cp -r /src /tmp/src && \ cd /tmp/src && \ ./configure || (cat config.log && exit 1) && \ make -j8 && \ ./python -m test.test_shutil \ ' Before + ./python -m test.test_shutil ..................s.................Es.E.....EssEE.....EE..ss..........s.................Fs......s.s.. ====================================================================== ERROR: test_copy2_symlinks (__main__.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/src/Lib/test/test_shutil.py", line 531, in test_copy2_symlinks os.lchmod(src_link, stat.S_IRWXU | stat.S_IRWXO) OSError: [Errno 95] Not supported: '/tmp/tmpcfxc61cw/baz' ====================================================================== ERROR: test_copy_symlinks (__main__.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/src/Lib/test/test_shutil.py", line 508, in test_copy_symlinks os.lchmod(src_link, stat.S_IRWXU | stat.S_IRWXO) OSError: [Errno 95] Not supported: '/tmp/tmplde2crj7/baz' ====================================================================== ERROR: test_copymode_symlink_to_symlink (__main__.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/src/Lib/test/test_shutil.py", line 318, in test_copymode_symlink_to_symlink os.lchmod(src_link, stat.S_IRWXO|stat.S_IRWXG) OSError: [Errno 95] Not supported: '/tmp/tmpr3v0c24m/baz' ====================================================================== ERROR: test_copystat_symlinks (__main__.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/src/Lib/test/test_shutil.py", line 364, in test_copystat_symlinks os.lchmod(src_link, stat.S_IRWXO) OSError: [Errno 95] Not supported: '/tmp/tmplqh68wha/baz' ====================================================================== ERROR: test_copytree_dangling_symlinks (__main__.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/src/Lib/test/test_shutil.py", line 892, in test_copytree_dangling_symlinks shutil.copytree(src_dir, dst_dir, symlinks=True) File "/tmp/src/Lib/shutil.py", line 359, in copytree raise Error(errors) shutil.Error: [('/tmp/tmpj76xsejs/test.txt', '/tmp/tmpg6s1ihql/destination3/test.txt', "[Errno 95] Not supported: '/tmp/tmpg6s1ihql/destination3/test.txt'")] ====================================================================== ERROR: test_copytree_symlink_dir (__main__.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/src/Lib/test/test_shutil.py", line 911, in test_copytree_symlink_dir shutil.copytree(src_dir, dst_dir, symlinks=True) File "/tmp/src/Lib/shutil.py", line 359, in copytree raise Error(errors) shutil.Error: [('/tmp/tmpsa0vkix_/link_to_dir', '/tmp/tmpta37k_s9/destination2/link_to_dir', "[Errno 95] Not supported: '/tmp/tmpta37k_s9/destination2/link_to_dir'")] ====================================================================== ERROR: test_copytree_symlinks (__main__.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/src/Lib/test/test_shutil.py", line 651, in test_copytree_symlinks os.lchmod(src_link, stat.S_IRWXU | stat.S_IRWXO) OSError: [Errno 95] Not supported: '/tmp/tmphrkx18bj/src/sub/link' ====================================================================== FAIL: test_unzip_zipfile (__main__.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/src/Lib/test/test_shutil.py", line 1118, in test_unzip_zipfile subprocess.check_output(zip_cmd, stderr=subprocess.STDOUT) subprocess.CalledProcessError: Command '['unzip', '-t', '/tmp/tmppyfabhkq/archive.zip']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/src/Lib/test/test_shutil.py", line 1122, in test_unzip_zipfile self.fail(msg.format(exc, details)) AssertionError: Command '['unzip', '-t', '/tmp/tmppyfabhkq/archive.zip']' returned non-zero exit status 1. **Unzip Output** unzip: unrecognized option: t BusyBox v1.26.2 (2017-10-04 13:37:41 GMT) multi-call binary. Usage: unzip [-lnopq] FILE[.zip] [FILE]... [-x FILE...] [-d DIR] Extract FILEs from ZIP archive -l List contents (with -q for short form) -n Never overwrite files (default: ask) -o Overwrite -p Print to stdout -q Quiet -x FILE Exclude FILEs -d DIR Extract into DIR ---------------------------------------------------------------------- Ran 102 tests in 0.289s FAILED (failures=1, errors=7, skipped=10) After + ./python -m test.test_shutil ..................s..................s.......s.s...........ss..........s.................Fs......s.s.. ====================================================================== FAIL: test_unzip_zipfile (__main__.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/src/Lib/test/test_shutil.py", line 1118, in test_unzip_zipfile subprocess.check_output(zip_cmd, stderr=subprocess.STDOUT) subprocess.CalledProcessError: Command '['unzip', '-t', '/tmp/tmp9zf_mymx/archive.zip']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/src/Lib/test/test_shutil.py", line 1122, in test_unzip_zipfile self.fail(msg.format(exc, details)) AssertionError: Command '['unzip', '-t', '/tmp/tmp9zf_mymx/archive.zip']' returned non-zero exit status 1. **Unzip Output** unzip: unrecognized option: t BusyBox v1.26.2 (2017-10-04 13:37:41 GMT) multi-call binary. Usage: unzip [-lnopq] FILE[.zip] [FILE]... [-x FILE...] [-d DIR] Extract FILEs from ZIP archive -l List contents (with -q for short form) -n Never overwrite files (default: ask) -o Overwrite -p Print to stdout -q Quiet -x FILE Exclude FILEs -d DIR Extract into DIR ---------------------------------------------------------------------- Ran 102 tests in 0.253s FAILED (failures=1, skipped=10) https://bugs.python.org/issue31940
Open Graph Description: Verified by compiling with alpine using the following Dockerfile and test script: FROM alpine RUN apk update && \ apk add expat-dev libressl-dev zlib-dev ncurses-dev bzip2-dev xz-dev \ ...
X Description: Verified by compiling with alpine using the following Dockerfile and test script: FROM alpine RUN apk update && \ apk add expat-dev libressl-dev zlib-dev ncurses-dev bzip2-dev x...
Opengraph URL: https://github.com/python/cpython/pull/4267
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:229350ad-008c-d04c-7b28-50996bbb4bc1 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B812:645E3:15CFC6:2006C6:6A4DFD95 |
| html-safe-nonce | d0fad1668a46561b514994e3ea3007f3934acc38d7822af9b74f3a4f54a8678b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODEyOjY0NUUzOjE1Q0ZDNjoyMDA2QzY6NkE0REZEOTUiLCJ2aXNpdG9yX2lkIjoiNTg2MDQwNTY5NjYxMzE4Njk2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 907df8f6a14ea42171a9e3fd4661407a4277e7eba5381deee4d86cd4e0cae06f |
| hovercard-subject-tag | pull_request:150662013 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/4267/files |
| twitter:image | https://avatars.githubusercontent.com/u/1810591?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1810591?s=400&v=4 |
| og:image:alt | Verified by compiling with alpine using the following Dockerfile and test script: FROM alpine RUN apk update && \ apk add expat-dev libressl-dev zlib-dev ncurses-dev bzip2-dev xz-dev \ ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5818716c93c6a2925b815402541a32814e43a7b1261c322b0c2df75224289566 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4314b1df11fa8a565684f3a72dc971e3785da365 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width