- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
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 2008-06-06 14:51 by pitrou, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Files | |||
|---|---|---|---|
| File name | Uploaded | Description | Edit |
| 3053.patch | pitrou, 2008-06-06 14:55 |
| Messages (6) | ||
|---|---|---|
| msg67771 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2008-06-06 14:51 |
test_shutil fails with the following error under some AIX 5.3 machine: ====================================================================== FAIL: test_on_error (__main__.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_shutil.py", line 35, in test_on_error shutil.rmtree(TESTFN, onerror=self.check_args_to_onerror) File "/qakplus/qa_test/SandBoxes/Antoine/Python-2.5.2/Lib/shutil.py", line 161, in rmtree onerror(os.listdir, path, sys.exc_info()) File "Lib/test/test_shutil.py", line 49, in check_args_to_onerror self.assertEqual(func, os.remove) AssertionError: <built-in function listdir> != <built-in function remove> The problem seems to be that the system is stricter with permissions (please note I don't know AIX at all, and the filesystems are unknown brands of network filesystems :-)), and @test in that test case is set to chmod 0400: $ chmod 400 @test $ ./python -c "import os; print os.listdir('@test')" Traceback (most recent call last): File "<string>", line 1, in <module> OSError: [Errno 13] Permission denied: '@test' $ chmod 100 @test $ ./python -c "import os; print os.listdir('@test')" Traceback (most recent call last): File "<string>", line 1, in <module> OSError: [Errno 13] Permission denied: '@test' $ chmod 500 @test $ ./python -c "import os; print os.listdir('@test')" ['a'] The error was witnessed with Python 2.5.2 but the test case doesn't seem to have changed in trunk so it should be the same there too. |
||
| msg67772 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2008-06-06 14:55 |
Here is a working patch. I've also added a try/finally block, because otherwise the following tests in regrtest.py couldn't run properly (@test was unremovable because of wrong permissions). |
||
| msg67774 - (view) | Author: Raghuram Devarakonda (draghuram) ![]() |
Date: 2008-06-06 15:11 |
Is there any particular reason to assert for failed function at all? This test seems to be for 'onerror' function and the test would be valid even without asserting whether the failed API is 'remove' or 'listdir' etc. Isn't it? |
||
| msg67776 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2008-06-06 15:21 |
Apparently it dates back to this commit: http://hg.pitrou.net/public/cpython/trunk/rev/56254b99fb78 Perhaps someone should ask the original author. But indeed I'm not sure why it's testing such implementation details. The only requirement about the first argument passed to the onerror callback is that it's one of (os.listdir, os.remove, os.rmdir). |
||
| msg116026 - (view) | Author: Sébastien Sablé (sable) | Date: 2010-09-10 16:10 |
For info: I have no problem with test_shutil on AIX 6.1 with python 2.6.6 or python 3.2alpha2. There may be no problem anymore. |
||
| msg116032 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2010-09-10 17:25 |
Ok, closing. The original install was on a rather strange setup. |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:35 | admin | set | github: 47303 |
| 2010-09-10 17:25:04 | pitrou | set | status: open -> closed resolution: works for me messages: + msg116032 |
| 2010-09-10 16:10:01 | sable | set | nosy:
+ sable messages: + msg116026 |
| 2010-06-09 22:33:36 | terry.reedy | set | versions: - Python 2.5 |
| 2008-06-06 15:21:02 | pitrou | set | messages: + msg67776 |
| 2008-06-06 15:11:44 | draghuram | set | nosy:
+ draghuram messages: + msg67774 |
| 2008-06-06 14:55:25 | pitrou | set | files:
+ 3053.patch keywords: + patch messages: + msg67772 |
| 2008-06-06 14:51:07 | pitrou | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements


