mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
tests: Only mock $INODE64 symbols on x86_64 macOS
The version of macOS running on Apple Silicon doesn't need to concern itself with backwards compatibility with 32-bit applications, and so it could jettison all the symbol aliasing shenanigans involved. https://gitlab.com/libvirt/libvirt/-/issues/121 Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com> Tested-by: Roman Bolshakov <r.bolshakov@yadro.com>
This commit is contained in:
parent
aebb2b6edf
commit
0ad938adc0
@ -56,7 +56,7 @@ static void init_syms(void)
|
|||||||
VIR_MOCK_REAL_INIT(access);
|
VIR_MOCK_REAL_INIT(access);
|
||||||
VIR_MOCK_REAL_INIT(mkdir);
|
VIR_MOCK_REAL_INIT(mkdir);
|
||||||
VIR_MOCK_REAL_INIT(open);
|
VIR_MOCK_REAL_INIT(open);
|
||||||
# ifdef __APPLE__
|
# if defined(__APPLE__) && defined(__x86_64__)
|
||||||
VIR_MOCK_REAL_INIT_ALIASED(opendir, "opendir$INODE64");
|
VIR_MOCK_REAL_INIT_ALIASED(opendir, "opendir$INODE64");
|
||||||
# else
|
# else
|
||||||
VIR_MOCK_REAL_INIT(opendir);
|
VIR_MOCK_REAL_INIT(opendir);
|
||||||
|
@ -161,7 +161,7 @@ static void virMockStatInit(void)
|
|||||||
debug = getenv("VIR_MOCK_STAT_DEBUG");
|
debug = getenv("VIR_MOCK_STAT_DEBUG");
|
||||||
|
|
||||||
#ifdef MOCK_STAT
|
#ifdef MOCK_STAT
|
||||||
# ifdef __APPLE__
|
# if defined(__APPLE__) && defined(__x86_64__)
|
||||||
VIR_MOCK_REAL_INIT_ALIASED(stat, "stat$INODE64");
|
VIR_MOCK_REAL_INIT_ALIASED(stat, "stat$INODE64");
|
||||||
# else
|
# else
|
||||||
VIR_MOCK_REAL_INIT(stat);
|
VIR_MOCK_REAL_INIT(stat);
|
||||||
@ -181,7 +181,7 @@ static void virMockStatInit(void)
|
|||||||
fdebug("real __xstat64 %p\n", real___xstat64);
|
fdebug("real __xstat64 %p\n", real___xstat64);
|
||||||
#endif
|
#endif
|
||||||
#ifdef MOCK_LSTAT
|
#ifdef MOCK_LSTAT
|
||||||
# ifdef __APPLE__
|
# if defined(__APPLE__) && defined(__x86_64__)
|
||||||
VIR_MOCK_REAL_INIT_ALIASED(lstat, "lstat$INODE64");
|
VIR_MOCK_REAL_INIT_ALIASED(lstat, "lstat$INODE64");
|
||||||
# else
|
# else
|
||||||
VIR_MOCK_REAL_INIT(lstat);
|
VIR_MOCK_REAL_INIT(lstat);
|
||||||
|
@ -936,7 +936,7 @@ init_syms(void)
|
|||||||
VIR_MOCK_REAL_INIT(__open_2);
|
VIR_MOCK_REAL_INIT(__open_2);
|
||||||
# endif /* ! __GLIBC__ */
|
# endif /* ! __GLIBC__ */
|
||||||
VIR_MOCK_REAL_INIT(close);
|
VIR_MOCK_REAL_INIT(close);
|
||||||
# ifdef __APPLE__
|
# if defined(__APPLE__) && defined(__x86_64__)
|
||||||
VIR_MOCK_REAL_INIT_ALIASED(opendir, "opendir$INODE64");
|
VIR_MOCK_REAL_INIT_ALIASED(opendir, "opendir$INODE64");
|
||||||
# else
|
# else
|
||||||
VIR_MOCK_REAL_INIT(opendir);
|
VIR_MOCK_REAL_INIT(opendir);
|
||||||
|
Loading…
Reference in New Issue
Block a user