Ejemplo n.º 1
0
        def test_syscall_unlink(ql, unlink_pathname, *args):
            target = False
            pathname = ql_read_string(ql, unlink_pathname)

            if pathname == "test_syscall_unlink.txt":
                print("test => unlink(%s)" % (pathname))
                target = True

            syscall.ql_syscall_unlink(ql, unlink_pathname, *args)

            if target:
                real_path = ql_transform_to_real_path(ql, pathname)
                assert os.path.isfile(real_path) == False
Ejemplo n.º 2
0
        def test_syscall_unlink(ql, unlink_pathname, *args):
            target = False
            pathname = ql.mem.string(unlink_pathname)

            if pathname == "test_syscall_unlink.txt":
                print("test => unlink(%s)" % (pathname))
                target = True

            regreturn = syscall.ql_syscall_unlink(ql, unlink_pathname, *args)

            if target:
                real_path = ql.os.transform_to_real_path(pathname)
                assert os.path.isfile(real_path) == False

            return regreturn