diff options
author | Christian Heimes <christian@python.org> | 2022-06-19 16:28:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-19 16:28:55 (GMT) |
commit | 2702e408fd0e0dd7aec396b4cf8c7ce9caae81d8 (patch) | |
tree | f3c5b2459a940b3b67e0059b7a2ed936cb6f5cf0 /Lib/test/test_posix.py | |
parent | 476d30250811e185615dfb971c6a810cac2093bd (diff) | |
download | cpython-2702e408fd0e0dd7aec396b4cf8c7ce9caae81d8.zip cpython-2702e408fd0e0dd7aec396b4cf8c7ce9caae81d8.tar.gz cpython-2702e408fd0e0dd7aec396b4cf8c7ce9caae81d8.tar.bz2 |
gh-84461: Fix Emscripten umask and permission issues (GH-94002)
- Emscripten's default umask is too strict, see
https://github.com/emscripten-core/emscripten/issues/17269
- getuid/getgid and geteuid/getegid are stubs that always return 0
(root). Disable effective uid/gid syscalls and fix tests that use
chmod() current user.
- Cannot drop X bit from directory.
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r-- | Lib/test/test_posix.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 4130cdd..ae25ef5 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -787,6 +787,7 @@ class PosixTester(unittest.TestCase): check_stat(uid, gid) @os_helper.skip_unless_working_chmod + @unittest.skipIf(support.is_emscripten, "getgid() is a stub") def test_chown(self): # raise an OSError if the file does not exist os.unlink(os_helper.TESTFN) @@ -798,6 +799,7 @@ class PosixTester(unittest.TestCase): @os_helper.skip_unless_working_chmod @unittest.skipUnless(hasattr(posix, 'fchown'), "test needs os.fchown()") + @unittest.skipIf(support.is_emscripten, "getgid() is a stub") def test_fchown(self): os.unlink(os_helper.TESTFN) @@ -1356,6 +1358,7 @@ class TestPosixDirFd(unittest.TestCase): @unittest.skipUnless(hasattr(os, 'chown') and (os.chown in os.supports_dir_fd), "test needs dir_fd support in os.chown()") + @unittest.skipIf(support.is_emscripten, "getgid() is a stub") def test_chown_dir_fd(self): with self.prepare_file() as (dir_fd, name, fullname): posix.chown(name, os.getuid(), os.getgid(), dir_fd=dir_fd) |