1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

tests: Fix opendir mocks on macOS

opendir() mocks need to search for decorated function with $INODE64
suffix, like stat mocks.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
This commit is contained in:
Roman Bolshakov 2020-11-24 01:10:13 +03:00 committed by Michal Privoznik
parent f1436fc76e
commit c2745d009f
2 changed files with 8 additions and 0 deletions

View File

@ -56,7 +56,11 @@ static void init_syms(void)
VIR_MOCK_REAL_INIT(access);
VIR_MOCK_REAL_INIT(mkdir);
VIR_MOCK_REAL_INIT(open);
# ifdef __APPLE__
VIR_MOCK_REAL_INIT_ALIASED(opendir, "opendir$INODE64");
# else
VIR_MOCK_REAL_INIT(opendir);
# endif
VIR_MOCK_REAL_INIT(execv);
VIR_MOCK_REAL_INIT(execve);
}

View File

@ -935,7 +935,11 @@ init_syms(void)
VIR_MOCK_REAL_INIT(__open_2);
# endif /* ! __GLIBC__ */
VIR_MOCK_REAL_INIT(close);
# ifdef __APPLE__
VIR_MOCK_REAL_INIT_ALIASED(opendir, "opendir$INODE64");
# else
VIR_MOCK_REAL_INIT(opendir);
# endif
VIR_MOCK_REAL_INIT(virFileCanonicalizePath);
}