Skip to content

Commit 2ec5bb5

Browse files
committed
Enable tests related to umask in test_import, fix guards in ObjectToOpaquePathNode
1 parent 1932ddd commit 2ec5bb5

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/PosixModuleBuiltins.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,13 +2124,13 @@ Object noCheck(VirtualFrame frame, Object obj, @SuppressWarnings("unused") boole
21242124
return stringOrBytesToOpaquePathNode.execute(fspathNode.call(frame, obj));
21252125
}
21262126

2127-
@Specialization(replaces = "noCheck", limit = "2")
2128-
Object withCheck(VirtualFrame frame, Object obj, boolean checkEmpty,
2127+
@Specialization(guards = "checkEmpty", limit = "2")
2128+
Object withCheck(VirtualFrame frame, Object obj, @SuppressWarnings("unused") boolean checkEmpty,
21292129
@Cached FspathNode fspathNode,
21302130
@CachedLibrary("obj") PythonObjectLibrary lib,
21312131
@Cached StringOrBytesToOpaquePathNode stringOrBytesToOpaquePathNode) {
21322132
Object stringOrBytes = fspathNode.call(frame, obj);
2133-
if (checkEmpty && lib.lengthWithFrame(obj, frame) == 0) {
2133+
if (lib.lengthWithFrame(obj, frame) == 0) {
21342134
throw raise(ValueError, ErrorMessages.EXECV_ARG2_FIRST_ELEMENT_CANNOT_BE_EMPTY);
21352135
}
21362136
return stringOrBytesToOpaquePathNode.execute(stringOrBytes);

graalpython/lib-python/3/test/test_import/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,6 @@ def test_dll_dependency_import(self):
512512
class FilePermissionTests(unittest.TestCase):
513513
# tests for file mode on cached .pyc files
514514

515-
@impl_detail("GR-25941: truffle umask support", graalvm=False)
516515
@unittest.skipUnless(os.name == 'posix',
517516
"test meaningful only on posix systems")
518517
def test_creation_mode(self):
@@ -856,7 +855,6 @@ def test_import_pyc_path(self):
856855
'bytecode file {!r} for {!r} does not '
857856
'exist'.format(pyc_path, TESTFN))
858857

859-
@impl_detail("GR-25941: truffle umask support", graalvm=False)
860858
@unittest.skipUnless(os.name == 'posix',
861859
"test meaningful only on posix systems")
862860
@unittest.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0,

0 commit comments

Comments
 (0)