gh-84461: Fix Emscripten umask and permission issues (GH-94002) by tiran · Pull Request #94002 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Lib/test/libregrtest/main.py
3 changes: 3 additions & 0 deletions Lib/test/test_posix.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,7 @@ def check_stat(uid, gid):
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)
Expand All @@ -798,6 +799,7 @@ def test_chown(self):

@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)

Expand Down Expand Up @@ -1356,6 +1358,7 @@ def test_chmod_dir_fd(self):

@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)
Expand Down
1 change: 1 addition & 0 deletions Lib/test/test_pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,7 @@ def test_apropos_with_unreadable_dir(self):
self.assertEqual(err.getvalue(), '')

@os_helper.skip_unless_working_chmod
@unittest.skipIf(is_emscripten, "cannot remove x bit")
def test_apropos_empty_doc(self):
pkgdir = os.path.join(TESTFN, 'walkpkg')
os.mkdir(pkgdir)
Expand Down
7 changes: 7 additions & 0 deletions Tools/wasm/config.site-wasm32-emscripten