opendir() mocks need to search for decorated function with $INODE64
suffix, like stat mocks.
Signed-off-by: Roman Bolshakov <r.bolshakov(a)yadro.com>
---
tests/virfilewrapper.c | 4 ++++
tests/virpcimock.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c
index 0500a3617e..ca2356b5c9 100644
--- a/tests/virfilewrapper.c
+++ b/tests/virfilewrapper.c
@@ -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);
}
diff --git a/tests/virpcimock.c b/tests/virpcimock.c
index 5cd688c825..686f894e99 100644
--- a/tests/virpcimock.c
+++ b/tests/virpcimock.c
@@ -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);
}
--
2.29.2