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

Method test_syscall_open

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

Source from the content-addressed store, hash-verified

277 return retval
278
279 def test_syscall_open(ql: Qiling, path: int, flags: int, mode: int):
280 retval = syscall.ql_syscall_open(ql, path, flags, mode)
281
282 vpath = ql.os.utils.read_cstring(path)
283
284 if vpath == "test_syscall_open.txt":
285 hpath = ql.os.path.virtual_to_host_path(vpath)
286
287 self.assertTrue(os.path.isfile(hpath))
288 checklist.append('open')
289
290 if ql.host.os is not QL_OS.WINDOWS:
291 os.remove(hpath)
292
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)

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