(ql: Qiling, path: int, length: int)
| 335 | return retval |
| 336 | |
| 337 | def test_syscall_truncate(ql: Qiling, path: int, length: int): |
| 338 | retval = syscall.ql_syscall_truncate(ql, path, length) |
| 339 | |
| 340 | vpath = ql.os.utils.read_cstring(path) |
| 341 | |
| 342 | if vpath == "test_syscall_truncate.txt": |
| 343 | hpath = ql.os.path.virtual_to_host_path(vpath) |
| 344 | |
| 345 | self.assertEqual(length, os.stat(hpath).st_size) |
| 346 | checklist.append('truncate') |
| 347 | |
| 348 | if ql.host.os is not QL_OS.WINDOWS: |
| 349 | os.remove(hpath) |
| 350 | |
| 351 | return retval |
| 352 | |
| 353 | def test_syscall_ftruncate(ql: Qiling, fd: int, length: int): |
| 354 | retval = syscall.ql_syscall_ftruncate(ql, fd, length) |
nothing calls this directly
no test coverage detected