On Thu, 2016-02-11 at 15:45 +0100, Ján Tomko wrote:
On Thu, Feb 11, 2016 at 02:36:28PM +0100, Andrea Bolognani wrote:
> Instead of compiling either the mock or the non-mock part of the
> file based on a compiler flag, split the mock part off to its
> own file.
> ---
> tests/Makefile.am | 4 +-
> tests/virportallocatormock.c | 108 ++++++++++++++++++++++++++++++++++++++++++
> tests/virportallocatortest.c | 110 +++----------------------------------------
> 3 files changed, 117 insertions(+), 105 deletions(-)
> create mode 100644 tests/virportallocatormock.c
> @@ -255,12 +168,3 @@ mymain(void)
> }
>
> VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir
"/.libs/libvirportallocatormock.so")
> -# endif
> -
> -#else /* ! defined(RTLD_NEXT) */
> -int
> -main(void)
> -{
> - return EXIT_AM_SKIP;
> -}
> -#endif
I'm afraid removing this will break the test on non-Linux.
ACK if you leave the EXIT_AM_SKIP in.
I'm reasonably confident it wouldn't make any difference, because
we don't check for the availability of that symbol anywhere else
in the code, not even in the dozen or so test cases that actually
use dynamic symbol loading. We even include <dlfcn.h> without
checking whether HAVE_DLFCN_H is defined in some cases.
That said, better safe than sorry, so I've restored the check and
pushed the whole series. Thanks for your review :)
--
Andrea Bolognani
Software Engineer - Virtualization Team