MCPcopy Create free account
hub / github.com/qilingframework/qiling / test_syscall_openat

Method test_syscall_openat

tests/test_elf.py:295–309  ·  view source on GitHub ↗
(ql: Qiling, fd: int, path: int, flags: int, mode: int)

Source from the content-addressed store, hash-verified

293 return retval
294
295 def test_syscall_openat(ql: Qiling, fd: int, path: int, flags: int, mode: int):
296 retval = syscall.ql_syscall_openat(ql, fd, path, flags, mode)
297
298 vpath = ql.os.utils.read_cstring(path)
299
300 if vpath == "test_syscall_open.txt":
301 hpath = ql.os.path.virtual_to_host_path(vpath)
302
303 self.assertTrue(os.path.isfile(hpath))
304 checklist.append('openat')
305
306 if ql.host.os is not QL_OS.WINDOWS:
307 os.remove(hpath)
308
309 return retval
310
311 def test_syscall_unlink(ql: Qiling, path: int):
312 retval = syscall.ql_syscall_unlink(ql, path)

Callers

nothing calls this directly

Calls 4

read_cstringMethod · 0.80
virtual_to_host_pathMethod · 0.80
appendMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected