]> xenbits.xensource.com Git - libvirt.git/commit
tests: Use flat namespace on macOS
authorRoman Bolshakov <r.bolshakov@yadro.com>
Wed, 21 Aug 2019 16:13:21 +0000 (19:13 +0300)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 23 Aug 2019 10:26:26 +0000 (11:26 +0100)
commitfefc4ff4cd144d04e7cb6dccdce709003dc6ea17
treedca582f00fbc46575bb177cd4b9cdb078037768a
parentd6b17edd516392ba6890cc3f41ec36d500e8c1ad
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: Roman Bolshakov <r.bolshakov@yadro.com>
tests/testutils.h