tests: Use flat namespace on macOS
Test executables and mocks have assumption that any symbol can be
replaced with LD_PRELOAD. That's not a case for macOS unless flat
namespace is used, because every external symbol reference records the
library to be looked up. And the symbols cannot be replaced unless dyld
interposing is used.
Setting DYLD_FORCE_FLAT_NAMESPACE changes symbol lookup behaviour to be
similar to Linux dynamic linker. It's more lightweight solution than
explicitly decorating all mock symbols as interpositions and building
libvirt as interposable dynamic library.
This fixes vircryptotest and allows to proceed other tests that rely on
mocks a little bit further.
Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com>
Showing
想要评论请 注册 或 登录