Serhiy, after your commits, test_os requires root privileges or it'll fail. This is not the case before.
[cpython]$ ./python -m test test_os
Run tests sequentially
0:00:00 [1/1] test_os
test test_os crashed -- Traceback (most recent call last):
File "/home/angwer/cpython/Lib/test/libregrtest/runtest.py", line 164, in runtest_inner
test_runner()
File "/home/angwer/cpython/Lib/test/libregrtest/runtest.py", line 163, in test_runner
support.run_unittest(tests)
File "/home/angwer/cpython/Lib/test/support/__init__.py", line 1849, in run_unittest
_run_suite(suite)
File "/home/angwer/cpython/Lib/test/support/__init__.py", line 1824, in _run_suite
raise TestFailed(err)
test.support.TestFailed: multiple errors occurred; run in verbose mode for details
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/angwer/cpython/Lib/test/libregrtest/runtest.py", line 167, in runtest_inner
test_time = time.time() - start_time
File "/home/angwer/cpython/Lib/test/libregrtest/save_env.py", line 278, in __exit__
restore(original)
File "/home/angwer/cpython/Lib/test/libregrtest/save_env.py", line 235, in restore_files
support.rmtree(fn)
File "/home/angwer/cpython/Lib/test/support/__init__.py", line 377, in rmtree
_rmtree(path)
File "/home/angwer/cpython/Lib/shutil.py", line 474, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File "/home/angwer/cpython/Lib/shutil.py", line 412, in _rmtree_safe_fd
_rmtree_safe_fd(dirfd, fullname, onerror)
File "/home/angwer/cpython/Lib/shutil.py", line 412, in _rmtree_safe_fd
_rmtree_safe_fd(dirfd, fullname, onerror)
File "/home/angwer/cpython/Lib/shutil.py", line 408, in _rmtree_safe_fd
onerror(os.open, fullname, sys.exc_info())
File "/home/angwer/cpython/Lib/shutil.py", line 406, in _rmtree_safe_fd
dirfd = os.open(name, os.O_RDONLY, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'SUB21'
'test_os' left behind directory '@test_23400_tmp' and it couldn't be removed: [Errno 13] Permission denied: 'SUB21'
test_os failed
1 test failed:
test_os
Total duration: 292 ms
Tests result: FAILURE
Traceback (most recent call last):
File "/home/angwer/cpython/Lib/test/support/__init__.py", line 914, in temp_dir
yield path
File "/home/angwer/cpython/Lib/test/support/__init__.py", line 963, in temp_cwd
yield cwd_dir
File "/home/angwer/cpython/Lib/test/libregrtest/main.py", line 468, in main
self._main(tests, kwargs)
File "/home/angwer/cpython/Lib/test/libregrtest/main.py", line 497, in _main
sys.exit(len(self.bad) > 0 or self.interrupted)
SystemExit: True
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/angwer/cpython/Lib/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/angwer/cpython/Lib/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/angwer/cpython/Lib/test/__main__.py", line 2, in <module>
main()
File "/home/angwer/cpython/Lib/test/libregrtest/main.py", line 532, in main
Regrtest().main(tests=tests, **kwargs)
File "/home/angwer/cpython/Lib/test/libregrtest/main.py", line 468, in main
self._main(tests, kwargs)
File "/home/angwer/cpython/Lib/contextlib.py", line 100, in __exit__
self.gen.throw(type, value, traceback)
File "/home/angwer/cpython/Lib/test/support/__init__.py", line 963, in temp_cwd
yield cwd_dir
File "/home/angwer/cpython/Lib/contextlib.py", line 100, in __exit__
self.gen.throw(type, value, traceback)
File "/home/angwer/cpython/Lib/test/support/__init__.py", line 917, in temp_dir
rmtree(path)
File "/home/angwer/cpython/Lib/test/support/__init__.py", line 377, in rmtree
_rmtree(path)
File "/home/angwer/cpython/Lib/shutil.py", line 474, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File "/home/angwer/cpython/Lib/shutil.py", line 412, in _rmtree_safe_fd
_rmtree_safe_fd(dirfd, fullname, onerror)
File "/home/angwer/cpython/Lib/shutil.py", line 412, in _rmtree_safe_fd
_rmtree_safe_fd(dirfd, fullname, onerror)
File "/home/angwer/cpython/Lib/shutil.py", line 412, in _rmtree_safe_fd
_rmtree_safe_fd(dirfd, fullname, onerror)
File "/home/angwer/cpython/Lib/shutil.py", line 408, in _rmtree_safe_fd
onerror(os.open, fullname, sys.exc_info())
File "/home/angwer/cpython/Lib/shutil.py", line 406, in _rmtree_safe_fd
dirfd = os.open(name, os.O_RDONLY, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'SUB21' |